/** * @param $permission * * @return Permission */ protected function getStoredPermission($permission) { if (is_string($permission)) { return Permission::findByName($permission); } return $permission; }
protected function hasDirectPermission(Permission $permission) { if (is_string($permission)) { $permission = Permission::findByName($permission); } return $this->permissions->contains('id', $permission->id); }