// ]); /* |-------------------------------------------------------------------------- | Register Service Providers |-------------------------------------------------------------------------- | | Here we will register all of the application's service providers which | are used to bind services into the container. Service providers are | totally optional, so you are not required to uncomment this line. | */ $app->register(App\Providers\StatelessSentinelServiceProvider::class); $app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class); $app->register(Dingo\Api\Provider\LumenServiceProvider::class); $app->register(Barryvdh\Cors\LumenServiceProvider::class); if (!$app->environment('production')) { $app->register(Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); } /* |-------------------------------------------------------------------------- | Load The Application Routes |-------------------------------------------------------------------------- | | Next we will include the routes file so that they can all be added to | the application. This will provide all of the URLs the application | can respond to, as well as the controllers that may handle them. | */ $app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) { require __DIR__ . '/../app/Http/routes.php'; });
<?php require_once __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | Here we will load the environment and create the application instance | that serves as the central piece of this framework. We'll use this | application as an "IoC" container and router for this framework. | */ $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); if (!$app->environment('travis')) { Dotenv::load(__DIR__ . '/../'); } if ($app->environment('production')) { Dotenv::load(__DIR__ . '/../'); } // $app->withFacades(); // $app->withEloquent(); /* |-------------------------------------------------------------------------- | Register Container Bindings |-------------------------------------------------------------------------- | | Now we will register a few bindings in the service container. We will | register the exception handler and the console kernel. You may add | your own bindings here if you like or you can make another file. |
<?php require_once __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | Here we will load the environment and create the application instance | that serves as the central piece of this framework. We'll use this | application as an "IoC" container and router for this framework. | */ $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); if ($app->environment() == 'local') { Dotenv::load(__DIR__ . '/../'); } $app->withFacades(); // $app->withEloquent(); /* |-------------------------------------------------------------------------- | Register Container Bindings |-------------------------------------------------------------------------- | | Now we will register a few bindings in the service container. We will | register the exception handler and the console kernel. You may add | your own bindings here if you like or you can make another file. | */ $app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'App\\Exceptions\\Handler'); $app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'App\\Console\\Kernel');