Method | Description | |
---|---|---|
make ( mixed | null $data = null ) : League\Fractal\Resource\ResourceInterface | Build a resource instance from the given data. |
Method | Description | |
---|---|---|
getMakeMethod ( mixed $data ) : string | Resolve which make method to call from the given date type. | |
makeFromArray ( array $array ) : League\Fractal\Resource\ResourceInterface | Make resource from a collection of Eloquent models. | |
makeFromBuilder ( |
Make resource from an Eloquent query builder. | |
makeFromCollection ( |
Make resource from a collection. | |
makeFromModel ( |
Make resource from an Eloquent model. | |
makeFromPaginator ( Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator ) : League\Fractal\Resource\ResourceInterface | Make resource from an Eloquent paginator. | |
makeFromPivot ( Illuminate\Database\Eloquent\Relations\Pivot $pivot ) : League\Fractal\Resource\ResourceInterface | Make resource from an Eloquent pivot table. | |
makeFromRelation ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : League\Fractal\Resource\ResourceInterface | Make resource from an Eloquent query builder. |
protected getMakeMethod ( mixed $data ) : string | ||
$data | mixed | |
return | string |
protected makeFromArray ( array $array ) : League\Fractal\Resource\ResourceInterface | ||
$array | array | |
return | League\Fractal\Resource\ResourceInterface |
protected makeFromBuilder ( |
||
$query | ||
return | League\Fractal\Resource\ResourceInterface |
protected makeFromCollection ( |
||
$collection | ||
return | League\Fractal\Resource\ResourceInterface |
protected makeFromModel ( |
||
$model | ||
return | League\Fractal\Resource\ResourceInterface |
protected makeFromPaginator ( Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator ) : League\Fractal\Resource\ResourceInterface | ||
$paginator | Illuminate\Contracts\Pagination\LengthAwarePaginator | |
return | League\Fractal\Resource\ResourceInterface |
protected makeFromPivot ( Illuminate\Database\Eloquent\Relations\Pivot $pivot ) : League\Fractal\Resource\ResourceInterface | ||
$pivot | Illuminate\Database\Eloquent\Relations\Pivot | |
return | League\Fractal\Resource\ResourceInterface |
protected makeFromRelation ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : League\Fractal\Resource\ResourceInterface | ||
$relation | Illuminate\Database\Eloquent\Relations\Relation | |
return | League\Fractal\Resource\ResourceInterface |