Méthode | Description | |
---|---|---|
make ( mixed | null $data = null ) : League\Fractal\Resource\ResourceInterface | Build a resource instance from the given data. |
Méthode | 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 | |
Résultat | string |
protected makeFromArray ( array $array ) : League\Fractal\Resource\ResourceInterface | ||
$array | array | |
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromBuilder ( |
||
$query | ||
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromCollection ( |
||
$collection | ||
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromModel ( |
||
$model | ||
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromPaginator ( Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator ) : League\Fractal\Resource\ResourceInterface | ||
$paginator | Illuminate\Contracts\Pagination\LengthAwarePaginator | |
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromPivot ( Illuminate\Database\Eloquent\Relations\Pivot $pivot ) : League\Fractal\Resource\ResourceInterface | ||
$pivot | Illuminate\Database\Eloquent\Relations\Pivot | |
Résultat | League\Fractal\Resource\ResourceInterface |
protected makeFromRelation ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : League\Fractal\Resource\ResourceInterface | ||
$relation | Illuminate\Database\Eloquent\Relations\Relation | |
Résultat | League\Fractal\Resource\ResourceInterface |