index.php 1.7 KB

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