hasRole() public method

Checks if the current user has a Role by its name or id
public hasRole ( string $role ) : boolean
$role string Role name.
return boolean
 /**
  * Checks if the current user has a Role by its name or id
  *
  * @param string $role Role name.
  * @return bool 
  * @static 
  */
 public static function hasRole($role)
 {
     return \App\Services\Access\Access::hasRole($role);
 }