Caffeinated\Shinobi\Shinobi::isRole PHP Method

isRole() public method

Checks if user is assigned the given role.
public isRole ( $role ) : boolean
return boolean
    public function isRole($role)
    {
        if ($this->auth->check()) {
            return $this->auth->user()->isRole($role);
        } else {
            if ($role === 'guest') {
                return true;
            }
        }
        return false;
    }