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
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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