src/Laratrust.php
public function hasRole($role, $team = null, $requireAll = false)
    {
        if ($user = $this->user()) {
            return $user->hasRole($role, $team, $requireAll);
        }

        return false;
    }
public function hasRole($role, $team = null, $requireAll = false)
    {
        if ($user = $this->user()) {
            return $user->hasRole($role, $team, $requireAll);
        }

        return false;
    }
public function hasRole ( $ role , $ team = null , $ requireAll = false ) { if ( $ user = $ this -> user ( ) ) { return $ user -> hasRole ( $ role , $ team , $ requireAll ) ; } return false ; }
Checks if the current user has a role by its name.

@param  string  $role  Role name.
@return bool
Checks if the current user has a role by its name .