Exemplo n.º 1
0
 /**
  * Get the model from which to remove the abilities.
  *
  * @return \Illuminate\Database\Eloquent\Model|null
  */
 protected function getModel()
 {
     if ($this->model instanceof Model) {
         return $this->model;
     }
     return Role::where('title', $this->model)->first();
 }
Exemplo n.º 2
0
 /**
  * Get the role.
  *
  * @return \Silber\Bouncer\Database\Role|null
  */
 protected function role()
 {
     if ($this->role instanceof Role) {
         return $role;
     }
     return Role::where('name', $this->role)->first();
 }