...
$categoriesWithDishes = $menu
->categories()
->with('dishes')
->get();
User::whereRaw('username = :username',[':username'=>'test'])->get();
'id =:id or something_else=:id'
class InfobjectResourceCollection extends ResourceCollection{
public $collects = InfobjectResource::class;
public function toArray($request)
{
return $this->collection->map
->additional($this->additional)
//можно прокинуть additional от коллекции, либо задать свойство в конструкторе коллекции
->map
->toArray($request)->all();
}
}
"url": "/packages/SentinelLaravelAuthDriver"
"require": {
"cartalyst/sentinel": "2.0.*",
"laravel/laravel": "5.1.*"
},