|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -/* |
4 |
| - * This file is part of Cachet. |
5 |
| - * |
6 |
| - * (c) Alt Three Services Limited |
7 |
| - * |
8 |
| - * For the full copyright and license information, please view the LICENSE |
9 |
| - * file that was distributed with this source code. |
10 |
| - */ |
11 |
| - |
12 |
| -use Illuminate\Contracts\Http\Kernel; |
13 | 3 | use Illuminate\Http\Request;
|
14 | 4 |
|
15 | 5 | define('LARAVEL_START', microtime(true));
|
16 | 6 |
|
17 |
| -/* |
18 |
| -|-------------------------------------------------------------------------- |
19 |
| -| Check If The Application Is Under Maintenance |
20 |
| -|-------------------------------------------------------------------------- |
21 |
| -| |
22 |
| -| If the application is in maintenance / demo mode via the "down" command |
23 |
| -| we will load this file so that any pre-rendered content can be shown |
24 |
| -| instead of starting the framework, which could cause an exception. |
25 |
| -| |
26 |
| -*/ |
27 |
| - |
| 7 | +// Determine if the application is in maintenance mode... |
28 | 8 | if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
29 | 9 | require $maintenance;
|
30 | 10 | }
|
31 | 11 |
|
32 |
| -/* |
33 |
| -|-------------------------------------------------------------------------- |
34 |
| -| Register The Auto Loader |
35 |
| -|-------------------------------------------------------------------------- |
36 |
| -| |
37 |
| -| Composer provides a convenient, automatically generated class loader for |
38 |
| -| this application. We just need to utilize it! We'll simply require it |
39 |
| -| into the script here so we don't need to manually load our classes. |
40 |
| -| |
41 |
| -*/ |
42 |
| - |
| 12 | +// Register the Composer autoloader... |
43 | 13 | require __DIR__.'/../vendor/autoload.php';
|
44 | 14 |
|
45 |
| -/* |
46 |
| -|-------------------------------------------------------------------------- |
47 |
| -| Run The Application |
48 |
| -|-------------------------------------------------------------------------- |
49 |
| -| |
50 |
| -| Once we have the application, we can handle the incoming request using |
51 |
| -| the application's HTTP kernel. Then, we will send the response back |
52 |
| -| to this client's browser, allowing them to enjoy our application. |
53 |
| -| |
54 |
| -*/ |
55 |
| - |
56 |
| -$app = require_once __DIR__.'/../bootstrap/app.php'; |
57 |
| - |
58 |
| -$kernel = $app->make(Kernel::class); |
59 |
| - |
60 |
| -$response = $kernel->handle( |
61 |
| - $request = Request::capture() |
62 |
| -)->send(); |
63 |
| - |
64 |
| -$kernel->terminate($request, $response); |
| 15 | +// Bootstrap Laravel and handle the request... |
| 16 | +(require_once __DIR__.'/../bootstrap/app.php') |
| 17 | + ->handleRequest(Request::capture()); |
0 commit comments