Property | Type | Description | |
---|---|---|---|
$relations | array | A list of all available relations. |
Method | Description | |
---|---|---|
allRelationsAllowed ( ) : boolean | Check if the transformer has whitelisted all relations. | |
getRelations ( ) : array | Get relations set on the transformer. | |
setRelations ( array | string $relations ) : self | Set relations on the transformer. |
Method | Description | |
---|---|---|
callIncludeMethod ( League\Fractal\Scope $scope, string $includeName, mixed $data ) : League\Fractal\Resource\ResourceInterface | boolean | Call method for retrieving a relation. This method overrides Fractal's own [callIncludeMethod] method to load relations directly from your models. | |
includePivot ( Illuminate\Database\Eloquent\Relations\Pivot $pivot ) : League\Fractal\Resource\ResourceInterface | boolean | Include pivot table data to the response. |
public allRelationsAllowed ( ) : boolean | ||
return | boolean |
public getRelations ( ) : array | ||
return | array |
protected includePivot ( Illuminate\Database\Eloquent\Relations\Pivot $pivot ) : League\Fractal\Resource\ResourceInterface | boolean | ||
$pivot | Illuminate\Database\Eloquent\Relations\Pivot | |
return | League\Fractal\Resource\ResourceInterface | boolean |
public setRelations ( array | string $relations ) : self | ||
$relations | array | string | |
return | self |
protected array $relations | ||
return | array |