A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
3.5KB

  1. <?php
  2. require_once __DIR__.'/../vendor/autoload.php';
  3. (new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
  4. dirname(__DIR__)
  5. ))->bootstrap();
  6. date_default_timezone_set(env('APP_TIMEZONE', 'UTC'));
  7. /*
  8. |--------------------------------------------------------------------------
  9. | Create The Application
  10. |--------------------------------------------------------------------------
  11. |
  12. | Here we will load the environment and create the application instance
  13. | that serves as the central piece of this framework. We'll use this
  14. | application as an "IoC" container and router for this framework.
  15. |
  16. */
  17. $app = new Laravel\Lumen\Application(
  18. dirname(__DIR__)
  19. );
  20. $app->withFacades();
  21. // $app->withEloquent();
  22. /*
  23. |--------------------------------------------------------------------------
  24. | Register Container Bindings
  25. |--------------------------------------------------------------------------
  26. |
  27. | Now we will register a few bindings in the service container. We will
  28. | register the exception handler and the console kernel. You may add
  29. | your own bindings here if you like or you can make another file.
  30. |
  31. */
  32. $app->singleton(
  33. Illuminate\Contracts\Debug\ExceptionHandler::class,
  34. App\Exceptions\Handler::class
  35. );
  36. $app->singleton(
  37. Illuminate\Contracts\Console\Kernel::class,
  38. App\Console\Kernel::class
  39. );
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Register Config Files
  43. |--------------------------------------------------------------------------
  44. |
  45. | Now we will register the "app" configuration file. If the file exists in
  46. | your configuration directory it will be loaded; otherwise, we'll load
  47. | the default version. You may register other files below as needed.
  48. |
  49. */
  50. $app->configure('app');
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Register Middleware
  54. |--------------------------------------------------------------------------
  55. |
  56. | Next, we will register the middleware with the application. These can
  57. | be global middleware that run before and after each request into a
  58. | route or middleware that'll be assigned to some specific routes.
  59. |
  60. */
  61. // $app->middleware([
  62. // App\Http\Middleware\ExampleMiddleware::class
  63. // ]);
  64. // $app->routeMiddleware([
  65. // 'auth' => App\Http\Middleware\Authenticate::class,
  66. // ]);
  67. /*
  68. |--------------------------------------------------------------------------
  69. | Register Service Providers
  70. |--------------------------------------------------------------------------
  71. |
  72. | Here we will register all of the application's service providers which
  73. | are used to bind services into the container. Service providers are
  74. | totally optional, so you are not required to uncomment this line.
  75. |
  76. */
  77. // $app->register(App\Providers\AppServiceProvider::class);
  78. // $app->register(App\Providers\AuthServiceProvider::class);
  79. // $app->register(App\Providers\EventServiceProvider::class);
  80. /*
  81. |--------------------------------------------------------------------------
  82. | Load The Application Routes
  83. |--------------------------------------------------------------------------
  84. |
  85. | Next we will include the routes file so that they can all be added to
  86. | the application. This will provide all of the URLs the application
  87. | can respond to, as well as the controllers that may handle them.
  88. |
  89. */
  90. $app->router->group([
  91. 'namespace' => 'App\Http\Controllers',
  92. ], function ($router) {
  93. require __DIR__.'/../routes/web.php';
  94. });
  95. if (env('APP_DEBUG')) {
  96. $app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
  97. }
  98. return $app;