-$app->alias('request', \BookStack\Http\Request::class);
-
-/*
-|--------------------------------------------------------------------------
-| Run The Application
-|--------------------------------------------------------------------------
-|
-| Once we have the application, we can handle the incoming request
-| through the kernel, and send the associated response back to
-| the client's browser allowing them to enjoy the creative
-| and wonderful application we have prepared for them.
-|
-*/
-
-$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
-
-$response = $kernel->handle(
- $request = \BookStack\Http\Request::capture()
-);
-
-$response->send();
+$app->alias('request', Request::class);
+
+$kernel = $app->make(Kernel::class);
+
+$response = tap($kernel->handle(
+ $request = Request::capture()
+))->send();