From e1869ed9e60338b134b152046e9a517bbb55ad79 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Tue, 19 Mar 2024 16:49:42 -0400 Subject: [PATCH] Update these --- artisan | 52 +++++---------------------------- public/index.php | 76 +++++++----------------------------------------- 2 files changed, 17 insertions(+), 111 deletions(-) diff --git a/artisan b/artisan index 240ab7a91..8e04b4224 100755 --- a/artisan +++ b/artisan @@ -1,53 +1,15 @@ #!/usr/bin/env php make(Illuminate\Contracts\Console\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput(), - new Symfony\Component\Console\Output\ConsoleOutput() -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running, we will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ - -$kernel->terminate($input, $status); +// Bootstrap Laravel and handle the command... +$status = (require_once __DIR__.'/bootstrap/app.php') + ->handleCommand(new ArgvInput); exit($status); diff --git a/public/index.php b/public/index.php index 796d29022..947d98963 100644 --- a/public/index.php +++ b/public/index.php @@ -1,73 +1,17 @@ - */ +use Illuminate\Http\Request; + define('LARAVEL_START', microtime(true)); -/* -|-------------------------------------------------------------------------- -| Check If Application Is Under Maintenance -|-------------------------------------------------------------------------- -| -| If the application is maintenance / demo mode via the "down" command we -| will require this file so that any pre-rendered template can be shown -| instead of starting the framework, which could cause an exception. -| -*/ - -if (file_exists(__DIR__ . '/../storage/framework/maintenance.php')) { - require __DIR__ . '/../storage/framework/maintenance.php'; +// Determine if the application is in maintenance mode... +if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { + require $maintenance; } -/* -|-------------------------------------------------------------------------- -| Register The Auto Loader -|-------------------------------------------------------------------------- -| -| 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. -| -*/ +// Register the Composer autoloader... +require __DIR__.'/../vendor/autoload.php'; -require __DIR__ . '/../vendor/autoload.php'; - -/* -|-------------------------------------------------------------------------- -| Turn On The Lights -|-------------------------------------------------------------------------- -| -| We need to illuminate PHP development, so let us turn on the lights. -| This bootstraps the framework and gets it ready for use, then it -| will load up this application so that we can run it and send -| the responses back to the browser and delight our users. -| -*/ - -$app = require_once __DIR__ . '/../bootstrap/app.php'; - -/* -|-------------------------------------------------------------------------- -| 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 = Illuminate\Http\Request::capture() -); - -$response->send(); - -$kernel->terminate($request, $response); +// Bootstrap Laravel and handle the request... +(require_once __DIR__.'/../bootstrap/app.php') + ->handleRequest(Request::capture());