index.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans.
  4. *
  5. * @author Taylor Otwell <taylor@laravel.com>
  6. */
  7. define('LARAVEL_START', microtime(true));
  8. if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
  9. require __DIR__.'/../storage/framework/maintenance.php';
  10. }
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Register The Auto Loader
  14. |--------------------------------------------------------------------------
  15. |
  16. | Composer provides a convenient, automatically generated class loader for
  17. | our application. We just need to utilize it! We'll simply require it
  18. | into the script here so that we don't have to worry about manual
  19. | loading any of our classes later on. It feels great to relax.
  20. |
  21. */
  22. require __DIR__.'/../vendor/autoload.php';
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Turn On The Lights
  26. |--------------------------------------------------------------------------
  27. |
  28. | We need to illuminate PHP development, so let us turn on the lights.
  29. | This bootstraps the framework and gets it ready for use, then it
  30. | will load up this application so that we can run it and send
  31. | the responses back to the browser and delight our users.
  32. |
  33. */
  34. $app = require_once __DIR__.'/../bootstrap/app.php';
  35. /*
  36. |--------------------------------------------------------------------------
  37. | Run The Application
  38. |--------------------------------------------------------------------------
  39. |
  40. | Once we have the application, we can handle the incoming request
  41. | through the kernel, and send the associated response back to
  42. | the client's browser allowing them to enjoy the creative
  43. | and wonderful application we have prepared for them.
  44. |
  45. */
  46. $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
  47. $response = $kernel->handle(
  48. $request = Illuminate\Http\Request::capture()
  49. );
  50. $response->send();
  51. $kernel->terminate($request, $response);