protected function hasRole()
    {
        $request = $this->request;
        $role = $this->getAction('is');

        return ! $this->forbiddenRoute() && $request->user()->hasRole($role);
    }
protected function hasRole()
    {
        $request = $this->request;
        $role = $this->getAction('is');

        return ! $this->forbiddenRoute() && $request->user()->hasRole($role);
    }
protected function hasRole ( ) { $ request = $ this -> request ; $ role = $ this -> getAction ( 'is' ) ; return ! $ this -> forbiddenRoute ( ) && $ request -> user ( ) -> hasRole ( $ role ) ; }
Check if user has requested route role.

@return bool
Check if user has requested route role .