From 322a11dced020f3649b648d483b97b251beb2271 Mon Sep 17 00:00:00 2001 From: Shift Date: Fri, 5 Apr 2024 18:36:48 +0000 Subject: [PATCH] Default new `bootstrap/app.php` --- bootstrap/app.php | 68 +++++++++++------------------------------ bootstrap/providers.php | 5 +++ 2 files changed, 23 insertions(+), 50 deletions(-) create mode 100644 bootstrap/providers.php diff --git a/bootstrap/app.php b/bootstrap/app.php index 7a1e15d6..d5d7e70d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,53 +1,21 @@ singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; +return Application::configure(basePath: dirname(__DIR__)) + ->withProviders() + ->withRouting( + web: __DIR__.'/../routes/web.php', + // api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + // channels: __DIR__.'/../routes/channels.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 00000000..38b258d1 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,5 @@ +