protected function isValid($response)
    {
        if (is_null($response)) {
            return true;
        }
        if (app('request') instanceof Request) {
            return $response->getStatusCode() !== 401;
        }
        return true;
    }
protected function isValid($response)
    {
        if (is_null($response)) {
            return true;
        }
        if (app('request') instanceof Request) {
            return $response->getStatusCode() !== 401;
        }
        return true;
    }
protected function isValid ( $ response ) { if ( is_null ( $ response ) ) { return true ; } if ( app ( 'request' ) instanceof Request ) { return $ response -> getStatusCode ( ) !== 401 ; } return true ; }
Verify request and response status code

@param \Illuminate\Http\Response $response
@return boolean
Verify request and response status code