Upload index.php
Browse files
index.php
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
use Illuminate\Contracts\Http\Kernel;
|
| 4 |
+
use Illuminate\Http\Request;
|
| 5 |
+
|
| 6 |
+
define('LARAVEL_START', microtime(true));
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
/*
|
| 10 |
+
|--------------------------------------------------------------------------
|
| 11 |
+
| Check If Application Is Under Maintenance
|
| 12 |
+
|--------------------------------------------------------------------------
|
| 13 |
+
|
|
| 14 |
+
| If the application is maintenance / demo mode via the "down" command we
|
| 15 |
+
| will require this file so that any prerendered template can be shown
|
| 16 |
+
| instead of starting the framework, which could cause an exception.
|
| 17 |
+
|
|
| 18 |
+
*/
|
| 19 |
+
|
| 20 |
+
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
| 21 |
+
require __DIR__.'/../storage/framework/maintenance.php';
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
|--------------------------------------------------------------------------
|
| 26 |
+
| Register The Auto Loader
|
| 27 |
+
|--------------------------------------------------------------------------
|
| 28 |
+
|
|
| 29 |
+
| Composer provides a convenient, automatically generated class loader for
|
| 30 |
+
| this application. We just need to utilize it! We'll simply require it
|
| 31 |
+
| into the script here so we don't need to manually load our classes.
|
| 32 |
+
|
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
require __DIR__.'/../vendor/autoload.php';
|
| 36 |
+
|
| 37 |
+
/*
|
| 38 |
+
|--------------------------------------------------------------------------
|
| 39 |
+
| Run The Application
|
| 40 |
+
|--------------------------------------------------------------------------
|
| 41 |
+
|
|
| 42 |
+
| Once we have the application, we can handle the incoming request using
|
| 43 |
+
| the application's HTTP kernel. Then, we will send the response back
|
| 44 |
+
| to this client's browser, allowing them to enjoy our application.
|
| 45 |
+
|
|
| 46 |
+
*/
|
| 47 |
+
|
| 48 |
+
$app = require_once __DIR__.'/../bootstrap/app.php';
|
| 49 |
+
|
| 50 |
+
$kernel = $app->make(Kernel::class);
|
| 51 |
+
|
| 52 |
+
$response = tap($kernel->handle(
|
| 53 |
+
$request = Request::capture()
|
| 54 |
+
))->send();
|
| 55 |
+
|
| 56 |
+
$kernel->terminate($request, $response);
|