PHP 클래스 Indatus\Ranger\ApiBaseController

This controller contains default behavior for controller actions such that a controller could just refer to the parent unless other custom functionality is needed.
상속: extends Illuminate\Routing\Controller
파일 보기 프로젝트 열기: indatus/ranger

보호된 프로퍼티들

프로퍼티 타입 설명
$belongsTo The variable should be set with the pluralized lowercase name of the parent. i.e. 'products'

보호된 메소드들

메소드 설명
handleAction ( Model $model, integer $id = null, array $parentData = [], array $additionalAssigns = [] ) : View | string Function to handle the default behavior for all restful actions, from the CRUD operations to rendering the appropriate response based on the request format.

메소드 상세

handleAction() 보호된 메소드

This function essentially looks at what URL was called, and determines the action that should be ran, then hands off the execution to a separate function specific to that action.
protected handleAction ( Model $model, integer $id = null, array $parentData = [], array $additionalAssigns = [] ) : View | string
$model Illuminate\Database\Eloquent\Model The model class that the controller is handling
$id integer The ID of the particular record in question IF the action requires it
$parentData array The key / value data for identifying parent for nested resources
$additionalAssigns array Array of additional data to be made available to the view
리턴 View | string | string The rendered template, or JSON data

프로퍼티 상세

$belongsTo 보호되어 있는 프로퍼티

The variable should be set with the pluralized lowercase name of the parent. i.e. 'products'
protected $belongsTo