index.php 2.0 KB

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