index.php 1.8 KB

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