예제 #1
0
 public function givePermissionTo(SitePermission $permission)
 {
     if (is_string($permission)) {
         return $this->permissions()->save(SitePermission::whereName($permission)->firstOrfail);
     }
     return $this->permissions()->save($permission);
 }