From 474059eee8a52e52d843e4cfcdc7f3f0f8df291c Mon Sep 17 00:00:00 2001 From: Shift Date: Thu, 10 Jul 2025 18:54:01 +0000 Subject: [PATCH] Default new `bootstrap/app.php` --- bootstrap/app.php | 70 +++++++++++------------------------------ bootstrap/providers.php | 5 +++ 2 files changed, 23 insertions(+), 52 deletions(-) create mode 100644 bootstrap/providers.php diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17df..d5d7e70d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,55 +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 @@ +