public function handle(Request $request) : Response
    {
        try {
            return (new Pipeline)
                ->send($request)
                ->through($this->convertMiddlewareToPipelineStages($this->getMiddleware()), 'handle')
                ->then(function ($request) {
                    return $this->router->route($request);
                })
                ->execute();
        } catch (Exception $ex) {
            $this->setExceptionRendererVars($request);
            $this->exceptionHandler->handle($ex);

            return $this->exceptionRenderer->getResponse();
        } catch (Throwable $ex) {
            $this->setExceptionRendererVars($request);
            $this->exceptionHandler->handle($ex);

            return $this->exceptionRenderer->getResponse();
        }
    }
public function handle(Request $request) : Response
    {
        try {
            return (new Pipeline)
                ->send($request)
                ->through($this->convertMiddlewareToPipelineStages($this->getMiddleware()), 'handle')
                ->then(function ($request) {
                    return $this->router->route($request);
                })
                ->execute();
        } catch (Exception $ex) {
            $this->setExceptionRendererVars($request);
            $this->exceptionHandler->handle($ex);

            return $this->exceptionRenderer->getResponse();
        } catch (Throwable $ex) {
            $this->setExceptionRendererVars($request);
            $this->exceptionHandler->handle($ex);

            return $this->exceptionRenderer->getResponse();
        }
    }
public function handle ( Request $ request ) : Response { try { return ( new Pipeline ) -> send ( $ request ) -> through ( $ this -> convertMiddlewareToPipelineStages ( $ this -> getMiddleware ( ) ) , 'handle' ) -> then ( function ( $ request ) { return $ this -> router -> route ( $ request ) ; } ) -> execute ( ) ; } catch ( Exception $ ex ) { $ this -> setExceptionRendererVars ( $ request ) ; $ this -> exceptionHandler -> handle ( $ ex ) ; return $ this -> exceptionRenderer -> getResponse ( ) ; } catch ( Throwable $ ex ) { $ this -> setExceptionRendererVars ( $ request ) ; $ this -> exceptionHandler -> handle ( $ ex ) ; return $ this -> exceptionRenderer -> getResponse ( ) ; } }
Handles an HTTP request

@param Request $request The HTTP request to handle
@return Response The HTTP response
Handles an HTTP request