/** * Creates the application. * * @return \Laravel\Lumen\Application */ public function createApplication() { $app = new Laravel\Lumen\Application(realpath(__DIR__)); $app->withFacades(); $app->configure('swagger-lume'); $app->singleton(Illuminate\Contracts\Console\Kernel::class, ConsoleKernel::class); $app->register(\SwaggerLume\ServiceProvider::class); $app->group(['namespace' => 'SwaggerLume'], function ($app) { require __DIR__ . '/../src/routes.php'; }); return $app; }
|-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::class); $app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class); $app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::class); $app->register(\Jenssegers\Mongodb\MongodbServiceProvider::class); $app->register(\Intervention\Image\ImageServiceProvider::class); $app->withEloquent(); /* |-------------------------------------------------------------------------- | 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'; }); $app->configure('imagecache'); return $app;
$app->register('Jenssegers\\Mongodb\\MongodbServiceProvider'); //$app->register('Indatus\LaravelPSRedis\LaravelPSRedisServiceProvider'); $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'); $app->configure('vast'); $app->configure('cache_time'); /* |-------------------------------------------------------------------------- | Register Middleware |-------------------------------------------------------------------------- | | Next, we will register the middleware with the application. These can | be global middleware that run before and after each request into a | route or middleware that'll be assigned to some specific routes. | */ $app->middleware(['Illuminate\\Session\\Middleware\\StartSession', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession']); // $app->routeMiddleware([ // ]); /*
|-------------------------------------------------------------------------- | 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'); /*|------------------------------------------- | Configuration Files |------------------------------------------- */ $app->configure('endpoints'); $app->configure('app'); $app->configure('status'); $app->configure('database'); /* |-------------------------------------------------------------------------- | Register Middleware |-------------------------------------------------------------------------- | | Next, we will register the middleware with the application. These can | be global middleware that run before and after each request into a | route or middleware that'll be assigned to some specific routes. | */ $app->routeMiddleware(['auth' => 'App\\Http\\Middleware\\AuthMiddleware', 'app2app' => 'Hexcores\\Api\\Http\\Middleware\\VerifyApiRequestHeader', 'cros' => 'App\\Http\\Middleware\\CORSMiddleware', 'etag' => 'App\\Http\\Middleware\\ETagMiddleware']); $app->middleware(['Illuminate\\Cookie\\Middleware\\EncryptCookies', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', 'Illuminate\\Session\\Middleware\\StartSession', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession']);
| | 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\AppServiceProvider::class); $app->register(App\Providers\ServiceProvider::class); $app->register(Jenssegers\Mongodb\MongodbServiceProvider::class); $app->register(Laravel\Socialite\SocialiteServiceProvider::class); $app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class); $app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::class); $app->withEloquent(); class_alias(Laravel\Socialite\Facades\Socialite::class, 'Socialite'); class_alias(Illuminate\Support\Facades\Config::class, 'Config'); $app->configure('services'); $app->configure('app'); $app->configure('secrets'); /* |-------------------------------------------------------------------------- | 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'; });
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->configure('jwt'); $app->withEloquent(); class_alias('Tymon\\JWTAuth\\Facades\\JWTAuth', 'JWTAuth'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /*
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); // $app->withEloquent(); $app->configure('asuka'); /* |-------------------------------------------------------------------------- | 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::class, Asuka\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, Asuka\Console\Kernel::class); /* |-------------------------------------------------------------------------- | Register Middleware
// ]); // $app->routeMiddleware([ // ]); /* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::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'; }); // Load mirror configuration file $app->configure('mirror'); return $app;
<?php require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->configure('pigeon'); $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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /*
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->configure('cors'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |-------------------------------------------------------------------------- | Register Middleware
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); // $app->withEloquent(); $app->configure('app'); $app->configure('mongo_lite'); /* |-------------------------------------------------------------------------- | 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'); /* |--------------------------------------------------------------------------
| */ $app->middleware([Illuminate\Cookie\Middleware\EncryptCookies::class, Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class]); // $app->routeMiddleware([ // ]); /* |-------------------------------------------------------------------------- | 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->configure('app'); $app->register(Admin\Providers\AppServiceProvider::class); $app->register(App\Providers\ArtisanServiceProvider::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'; try { (new Dotenv\Dotenv(__DIR__ . '/../'))->load(); } catch (Dotenv\Exception\InvalidPathException $e) { // } $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->withEloquent(); $app->withFacades(); $app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); # Middleware $app->routeMiddleware(['auth' => App\Http\Middleware\Authenticate::class]); //if (env('APP_ENV') === 'local') { // $app->register(\OutlineLaravel\OutlineLaravelServiceProvider::class); //} # Service Providers $app->register(App\Providers\AppServiceProvider::class); $app->register(App\Providers\EventServiceProvider::class); $app->register(\Barryvdh\Cors\LumenServiceProvider::class); $app->configure('cors'); $app->configure('app'); $app->configure('queue'); # Routes $app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) { require __DIR__ . '/../app/Http/routes.php'; }); return $app;
// } /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->configure('jwt'); $app->configure('mail'); $app->configure('amtekcommerce'); class_alias(Tymon\JWTAuth\Facades\JWTAuth::class, 'JWTAuth'); class_alias(Illuminate\Support\Facades\Mail::class, 'Mail'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class);
<?php require_once __DIR__ . '/../vendor/autoload.php'; try { (new Dotenv\Dotenv(__DIR__ . '/../'))->load(); } catch (Dotenv\Exception\InvalidPathException $e) { // } $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); // $app->middleware([ // App\Http\Middleware\ExampleMiddleware::class // ]); $app->routeMiddleware(['auth' => App\Http\Middleware\Authenticate::class]); // $app->register(App\Providers\AppServiceProvider::class); $app->register(App\Providers\AuthServiceProvider::class); $app->register(App\Providers\EventServiceProvider::class); $app->register(Laravel\Socialite\SocialiteServiceProvider::class); $app->configure('services'); $app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) { require __DIR__ . '/Http/routes.php'; }); return $app;
/* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::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'; }); /* * App config */ $app->configure('database'); $app->configure('options'); return $app;
// ]); $app->routeMiddleware(['authToken' => App\Http\Middleware\AuthToken::class, 'reCAPTCHA' => App\Http\Middleware\reCAPTCHA::class, 'Authorize' => App\Http\Middleware\Authorize::class]); /* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); $app->register(App\Providers\AuthServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::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'; }); // Load configuration file $app->configure('captcha'); return $app;
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->configure('twitter'); $app->configure('facebook'); $app->configure('linkedin'); $app->configure('times'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class);
// $app->routeMiddleware([ // ]); /* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::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'; }); $app->configure('Log'); $app->configure('Flush'); $app->configure('yzh'); return $app;
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->configure('archive'); /* |-------------------------------------------------------------------------- | 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'); /* |-------------------------------------------------------------------------- | Register Middleware
// ]); /* |-------------------------------------------------------------------------- | 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\\AppServiceProvider'); # bind all calls to the emailer contract to use CAMPAIGN MONITOR $app->bind('\\App\\V1\\Interfaces\\EmailerInterface', 'App\\V1\\Mailers\\CampaignMonitor'); # load the response codes config file $app->configure('responsecodes'); $app->configure('protectedlists'); $app->configure('apikeys'); # register an event handler for the mail request event Event::listen('RequestWasLogged', '\\App\\V1\\Events\\RequestWasLogged@handle'); /* |-------------------------------------------------------------------------- | 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. | */ require __DIR__ . '/../app/Http/routes.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__ . '/../')); unset($app->availableBindings['validator']); $app->register('Jenssegers\\Mongodb\\MongodbServiceProvider'); $app->withFacades(); $app->withEloquent(); $app->configure('database'); $app->configure('tokens'); $app->configure('applicationable'); $app->configure('services'); $app->configure('errors'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class);
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); /* |-------------------------------------------------------------------------- | 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__ . '/../')); $app->withFacades(); $app->withEloquent(); $app->configure('twitter'); $app->configure('github'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |--------------------------------------------------------------------------
// } /* |-------------------------------------------------------------------------- | 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__ . '/../')); // $app->withFacades(); // $app->withEloquent(); $app->configure('webster'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |-------------------------------------------------------------------------- | Register Middleware
|-------------------------------------------------------------------------- | 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__ . '/../')); $app->register('Jenssegers\\Mongodb\\MongodbServiceProvider'); $app->register('Folklore\\Image\\ImageServiceProvider'); class_alias('Folklore\\Image\\Facades\\Image', 'Image'); $app->withEloquent(); $app->withFacades(); $app->configure('database'); $app->configure('image'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |--------------------------------------------------------------------------
// ]); // $app->routeMiddleware([ // ]); /* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::class); $app->configure('twigbridge'); $app->register('TwigBridge\\ServiceProvider'); /* |-------------------------------------------------------------------------- | 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'; }); return $app;
| be global middleware that run before and after each request into a | route or middleware that'll be assigned to some specific routes. | */ $app->middleware(['Illuminate\\Session\\Middleware\\StartSession']); // $app->routeMiddleware([ // ]); /* |-------------------------------------------------------------------------- | 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->configure('messenger'); $app->register('Cmgmyr\\Messenger\\MessengerServiceProvider'); /* |-------------------------------------------------------------------------- | 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. | */ require __DIR__ . '/../app/Http/routes.php'; return $app;
require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../', env('ENV_FILE', '.env')); /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | Here we will load the environment and create the application instance | that servers as the central piece of the framework. We'll use this | application as an "IoC" container and router for this framework. | */ $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->useStoragePath(env('APP_STORAGE_PATH')); $app->configure('app'); $app->configure('auth'); $app->configure('view'); $app->configure('cors'); $app->configure('database'); $app->configure('doctrine'); $app->configure('oauth2'); $app->configure('serializer'); $app->configure('rbac'); $app->configure('services'); $app->configure('mail'); $app->withFacades(); /* |-------------------------------------------------------------------------- | Register Container Bindings |--------------------------------------------------------------------------
} /* |-------------------------------------------------------------------------- | 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__ . '/../')); // $app->withFacades(); $app->withEloquent(); // Register config files $app->configure('auth'); $app->configure('jwt'); $app->configure('cors'); /* |-------------------------------------------------------------------------- | 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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /*
/* |-------------------------------------------------------------------------- | 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\AppServiceProvider::class); // $app->register(App\Providers\EventServiceProvider::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'; }); /** * Custom configuration files **/ $app->configure('api'); /* ------------------------ */ return $app;