Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. require_once __DIR__.'/../vendor/autoload.php';
  3. Dotenv::load(__DIR__.'/../');
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Create The Application
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here we will load the environment and create the application instance
  10. | that serves as the central piece of this framework. We'll use this
  11. | application as an "IoC" container and router for this framework.
  12. |
  13. */
  14. $app = new Laravel\Lumen\Application(
  15. realpath(__DIR__.'/../')
  16. );
  17. $app->withFacades();
  18. $app->withEloquent();
  19. /*
  20. |--------------------------------------------------------------------------
  21. | Register Container Bindings
  22. |--------------------------------------------------------------------------
  23. |
  24. | Now we will register a few bindings in the service container. We will
  25. | register the exception handler and the console kernel. You may add
  26. | your own bindings here if you like or you can make another file.
  27. |
  28. */
  29. $app->singleton(
  30. Illuminate\Contracts\Debug\ExceptionHandler::class,
  31. App\Exceptions\Handler::class
  32. );
  33. $app->singleton(
  34. Illuminate\Contracts\Console\Kernel::class,
  35. App\Console\Kernel::class
  36. );
  37. /*
  38. |--------------------------------------------------------------------------
  39. | Register Middleware
  40. |--------------------------------------------------------------------------
  41. |
  42. | Next, we will register the middleware with the application. These can
  43. | be global middleware that run before and after each request into a
  44. | route or middleware that'll be assigned to some specific routes.
  45. |
  46. */
  47. // $app->middleware([
  48. // // Illuminate\Cookie\Middleware\EncryptCookies::class,
  49. // // Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  50. // // Illuminate\Session\Middleware\StartSession::class,
  51. // // Illuminate\View\Middleware\ShareErrorsFromSession::class,
  52. // // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
  53. // ]);
  54. // $app->routeMiddleware([
  55. // ]);
  56. /*
  57. |--------------------------------------------------------------------------
  58. | Register Service Providers
  59. |--------------------------------------------------------------------------
  60. |
  61. | Here we will register all of the application's service providers which
  62. | are used to bind services into the container. Service providers are
  63. | totally optional, so you are not required to uncomment this line.
  64. |
  65. */
  66. // $app->register(App\Providers\AppServiceProvider::class);
  67. // $app->register(App\Providers\EventServiceProvider::class);
  68. /*
  69. |--------------------------------------------------------------------------
  70. | Load The Application Routes
  71. |--------------------------------------------------------------------------
  72. |
  73. | Next we will include the routes file so that they can all be added to
  74. | the application. This will provide all of the URLs the application
  75. | can respond to, as well as the controllers that may handle them.
  76. |
  77. */
  78. $app->group(['namespace' => 'App\Http\Controllers'], function ($app) {
  79. require __DIR__.'/../app/Http/routes.php';
  80. });
  81. return $app;