Advertisement
firmansmoh

index.php

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