X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a5e49f642b18de09cac0f2fdceacf07b0bafafe7..refs/pull/3032/head:/public/index.php diff --git a/public/index.php b/public/index.php index ad378d7e0..7e4ef97c7 100644 --- a/public/index.php +++ b/public/index.php @@ -1,25 +1,25 @@ */ - define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- -| Initialize The App +| Register The Auto Loader |-------------------------------------------------------------------------- | -| We need to get things going before we start up the app. -| The init file loads everything in, in the correct order. +| Composer provides a convenient, automatically generated class loader for +| our application. We just need to utilize it! We'll simply require it +| into the script here so that we don't have to worry about manual +| loading any of our classes later on. It feels great to relax. | */ -require __DIR__.'/../bootstrap/init.php'; +require __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- @@ -33,7 +33,8 @@ require __DIR__.'/../bootstrap/init.php'; | */ -$app = require_once __DIR__.'/../bootstrap/app.php'; +$app = require_once __DIR__ . '/../bootstrap/app.php'; +$app->alias('request', \BookStack\Http\Request::class); /* |-------------------------------------------------------------------------- @@ -50,9 +51,9 @@ $app = require_once __DIR__.'/../bootstrap/app.php'; $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( - $request = Illuminate\Http\Request::capture() + $request = \BookStack\Http\Request::capture() ); $response->send(); -$kernel->terminate($request, $response); \ No newline at end of file +$kernel->terminate($request, $response);