From 4a1bc9ba4a7c8748d799e2416e8874b470e80da2 Mon Sep 17 00:00:00 2001 From: vasya Date: Tue, 24 Mar 2026 20:17:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D1=8F=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0=20=D0=B8=D0=B7=20=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D1=80=D0=BE=D0=B9=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootstrap/app.php | 67 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index c183276..037e17d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,18 +1,55 @@ withRouting( - web: __DIR__.'/../routes/web.php', - commands: __DIR__.'/../routes/console.php', - health: '/up', - ) - ->withMiddleware(function (Middleware $middleware): void { - // - }) - ->withExceptions(function (Exceptions $exceptions): void { - // - })->create(); +$app = new Illuminate\Foundation\Application( + $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) +); + +/* +|-------------------------------------------------------------------------- +| Bind Important Interfaces +|-------------------------------------------------------------------------- +| +| Next, we need to bind some important interfaces into the container so +| we will be able to resolve them when needed. The kernels serve the +| incoming requests to this application from both the web and CLI. +| +*/ + +$app->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;