/** * 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(); }
/** * 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(); }