Ejemplo n.º 1
0
 /**
  * Get all the privileges of a given authorable.
  *
  * @param  Agency\Contracts\Cms\AuthorableInterface $authorable
  * @return Illuminate\Database\Eloquent\Collection
  */
 protected function all(AuthorableInterface $authorable)
 {
     return Privilege::with($this->with)->whereHas('admin', function ($q) use($authorable) {
         $q->where('id', $authorable->getKey());
     })->get();
 }