|
6 | 6 | * @author Alexey Bobkov, Samuel Georges |
7 | 7 | */ |
8 | 8 |
|
| 9 | +define('LARAVEL_START', microtime(true)); |
| 10 | + |
| 11 | +/* |
| 12 | +|-------------------------------------------------------------------------- |
| 13 | +| Register Core Helpers |
| 14 | +|-------------------------------------------------------------------------- |
| 15 | +| |
| 16 | +| We cannot rely on Composer's load order when calculating the weight of |
| 17 | +| each package. This line ensures that the core global helpers are |
| 18 | +| always given priority one status. |
| 19 | +| |
| 20 | +*/ |
| 21 | + |
| 22 | +$helperPath = __DIR__.'/vendor/october/rain/src/Support/helpers.php'; |
| 23 | + |
| 24 | +if (!file_exists($helperPath)) { |
| 25 | + echo 'Missing vendor files, try running "composer install" or use the Wizard installer.'.PHP_EOL; |
| 26 | + exit(1); |
| 27 | +} |
| 28 | + |
| 29 | +require $helperPath; |
| 30 | + |
9 | 31 | /* |
10 | 32 | |-------------------------------------------------------------------------- |
11 | | -| Register composer |
| 33 | +| Register The Auto Loader |
12 | 34 | |-------------------------------------------------------------------------- |
13 | 35 | | |
14 | | -| Composer provides a generated class loader for the application. |
| 36 | +| Composer provides a convenient, automatically generated class loader for |
| 37 | +| our application. We just need to utilize it! We'll simply require it |
| 38 | +| into the script here so that we don't have to worry about manual |
| 39 | +| loading any of our classes later on. It feels great to relax. |
15 | 40 | | |
16 | 41 | */ |
17 | 42 |
|
18 | | -require __DIR__.'/bootstrap/autoload.php'; |
| 43 | +require __DIR__.'/vendor/autoload.php'; |
19 | 44 |
|
20 | 45 | /* |
21 | 46 | |-------------------------------------------------------------------------- |
22 | | -| Load framework |
| 47 | +| Turn On The Lights |
23 | 48 | |-------------------------------------------------------------------------- |
24 | 49 | | |
25 | | -| This bootstraps the framework and loads up this application. |
| 50 | +| We need to illuminate PHP development, so let us turn on the lights. |
| 51 | +| This bootstraps the framework and gets it ready for use, then it |
| 52 | +| will load up this application so that we can run it and send |
| 53 | +| the responses back to the browser and delight our users. |
26 | 54 | | |
27 | 55 | */ |
28 | 56 |
|
29 | 57 | $app = require_once __DIR__.'/bootstrap/app.php'; |
30 | 58 |
|
31 | 59 | /* |
32 | 60 | |-------------------------------------------------------------------------- |
33 | | -| Process request |
| 61 | +| Run The Application |
34 | 62 | |-------------------------------------------------------------------------- |
35 | 63 | | |
36 | | -| Execute the request and send the response back to the client. |
| 64 | +| Once we have the application, we can handle the incoming request |
| 65 | +| through the kernel, and send the associated response back to |
| 66 | +| the client's browser allowing them to enjoy the creative |
| 67 | +| and wonderful application we have prepared for them. |
37 | 68 | | |
38 | 69 | */ |
39 | 70 |
|
40 | | -$kernel = $app->make('Illuminate\Contracts\Http\Kernel'); |
| 71 | +$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); |
41 | 72 |
|
42 | 73 | $response = $kernel->handle( |
43 | 74 | $request = Illuminate\Http\Request::capture() |
|
0 commit comments