PHP Class 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.
Inheritance: extends Illuminate\Routing\Controller
Afficher le fichier Open project: indatus/ranger

Protected Properties

Свойство Type Description
$belongsTo The variable should be set with the pluralized lowercase name of the parent. i.e. 'products'

Méthodes protégées

Méthode Description
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.

Method Details

handleAction() protected méthode

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
Résultat View | string | string The rendered template, or JSON data

Property Details

$belongsTo protected_oe property

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