public function handleJwtException(JwtException $e)
    {
        if($e instanceof InvalidTokenException) {
            return $this->handleJwtInvalidToken($e);
        } elseif ($e instanceof NoTokenException) {
            return $this->handleJwtNoToken($e);
        } elseif ($e instanceof NoSecretException) {
            return $this->handleJwtNoSecret($e);
        } else {
            $message = getenv('JWT_MESSAGE_ERROR') ?: 'There was an error while validating the authorization token.';
            return response()->json([
                'error' => $message
            ], 500);
        }
    }
public function handleJwtException(JwtException $e)
    {
        if($e instanceof InvalidTokenException) {
            return $this->handleJwtInvalidToken($e);
        } elseif ($e instanceof NoTokenException) {
            return $this->handleJwtNoToken($e);
        } elseif ($e instanceof NoSecretException) {
            return $this->handleJwtNoSecret($e);
        } else {
            $message = getenv('JWT_MESSAGE_ERROR') ?: 'There was an error while validating the authorization token.';
            return response()->json([
                'error' => $message
            ], 500);
        }
    }
public function handleJwtException ( JwtException $ e ) { if ( $ e instanceof InvalidTokenException ) { return $ this -> handleJwtInvalidToken ( $ e ) ; } elseif ( $ e instanceof NoTokenException ) { return $ this -> handleJwtNoToken ( $ e ) ; } elseif ( $ e instanceof NoSecretException ) { return $ this -> handleJwtNoSecret ( $ e ) ; } else { $ message = getenv ( 'JWT_MESSAGE_ERROR' ) ? : 'There was an error while validating the authorization token.' ; return response ( ) -> json ( [ 'error' => $ message ] , 500 ) ; } }
Render JWT exception

@param JwtException $e

@return \Illuminate\Http\Response
Render JWT exception