protected function sendRequestThroughRouter($request)
    {
        $this->app->bootApplication($request);
        $this->pipeline = new Pipeline($this->container);

        return $this->pipeline
            ->send($request)
            ->through($this->parseMiddlewareToPipelines($this->getMiddleware()), 'handle')
            ->then($this->dispatchToRouter())
            ->run();
    }