public function allow($permission) { if ($user = $this->user()) { return $user->allow($permission); } return false; }
/** * Check if the current user has a permission by its name or id * * @param string $permission Permission name or id. * @return bool * @static */ public static function allow($permission) { return \App\Services\Access\Access::allow($permission); }