start.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Create The Application
  5. |--------------------------------------------------------------------------
  6. |
  7. | The first thing we will do is create a new Laravel application instance
  8. | which serves as the "glue" for all the components of Laravel, and is
  9. | the IoC container for the system binding all of the various parts.
  10. |
  11. */
  12. $app = new Illuminate\Foundation\Application;
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Detect The Application Environment
  16. |--------------------------------------------------------------------------
  17. |
  18. | Laravel takes a dead simple approach to your application environments
  19. | so you can just specify a machine name for the host that matches a
  20. | given environment, then we will automatically detect it for you.
  21. |
  22. */
  23. require __DIR__.'/environment.php';
  24. /*
  25. |--------------------------------------------------------------------------
  26. | Bind Paths
  27. |--------------------------------------------------------------------------
  28. |
  29. | Here we are binding the paths configured in paths.php to the app. You
  30. | should not be changing these here. If you need to change these you
  31. | may do so within the paths.php file and they will be bound here.
  32. |
  33. */
  34. $app->bindInstallPaths(require __DIR__.'/paths.php');
  35. /*
  36. |--------------------------------------------------------------------------
  37. | Load The Application
  38. |--------------------------------------------------------------------------
  39. |
  40. | Here we will load this Illuminate application. We will keep this in a
  41. | separate location so we can isolate the creation of an application
  42. | from the actual running of the application with a given request.
  43. |
  44. */
  45. $framework = $app['path.base'].
  46. '/vendor/laravel/framework/src';
  47. require $framework.'/Illuminate/Foundation/start.php';
  48. /*
  49. |--------------------------------------------------------------------------
  50. | Return The Application
  51. |--------------------------------------------------------------------------
  52. |
  53. | This script returns the application instance. The instance is given to
  54. | the calling script so we can separate the building of the instances
  55. | from the actual running of the application and sending responses.
  56. |
  57. */
  58. return $app;