public function can($permission, $requireAll = false)
    {
        if ($user = $this->user()) {
            return $user->can($permission, $requireAll);
        }

        return false;
    }
public function can($permission, $requireAll = false)
    {
        if ($user = $this->user()) {
            return $user->can($permission, $requireAll);
        }

        return false;
    }
public function can ( $ permission , $ requireAll = false ) { if ( $ user = $ this -> user ( ) ) { return $ user -> can ( $ permission , $ requireAll ) ; } return false ; }
Check if the current user has a permission by its name

@param string $permission Permission string.

@return bool
Check if the current user has a permission by its name