app\HasRoles::hasRole PHP Метод

hasRole() публичный Метод

Determine if the user has the given role.
public hasRole ( mixed $role ) : boolean
$role mixed
Результат boolean
    public function hasRole($role)
    {
        if (is_string($role)) {
            return $this->roles->contains('name', $role);
        }
        return !!$role->intersect($this->roles)->count();
    }