/** * 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; }
<?php require_once __DIR__ . '/../vendor/autoload.php'; $app = new Laravel\Lumen\Application(realpath(__DIR__)); $app->withFacades(); $app->withEloquent(); $app->singleton(\Illuminate\Contracts\Debug\ExceptionHandler::class, function () { $handler = new \Chatbox\Lumen\Exceptions\Handler(); // set your Reporters; return $handler; }); $app->register(\Chatbox\LumenApp\LumenAppServiceProvider::class); $app->get("/", function () { return ["message" => "hello lumen application "]; }); return $app;
| */ $app = new Laravel\Lumen\Application(); // $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'); $app->singleton('PioEventClient', function ($app) { $pio_accesskey = 'YOUR_PREDICTION_IO_APP_KEY'; $pio_eventserver = 'http://127.0.0.1:7070'; return new EventClient($pio_accesskey, $pio_eventserver); }); $app->singleton('PioPredictionClient', function ($app) { $pio_predictionserver = 'http://127.0.0.1:8000'; return new EngineClient($pio_predictionserver); }); /* |-------------------------------------------------------------------------- | Register Middleware |-------------------------------------------------------------------------- |
/* |-------------------------------------------------------------------------- | 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->singleton( // 'Illuminate\Contracts\Debug\ExceptionHandler', // 'App\Exceptions\Handler' //); /* |-------------------------------------------------------------------------- | 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([
| 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__ . '/../')); /* |-------------------------------------------------------------------------- | 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, LaravelDoctrine\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, LaravelDoctrine\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(LaravelDoctrine\Providers\AppServiceProvider::class); /* |-------------------------------------------------------------------------- | Load The Application Routes
| */ $app = new Laravel\Lumen\Application(realpath(__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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); $app->singleton('App\\MediaRepositoryInterface', function ($app) { $RepositoryObject = env('REPOSITORY_OBJECT', 'App\\LocalMediaRepository'); return new $RepositoryObject(); }); /* |-------------------------------------------------------------------------- | 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 = new Laravel\Lumen\Application(realpath(__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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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([ // App\Http\Middleware\ExampleMiddleware::class // ]); // $app->routeMiddleware([
$app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->withFacades(); $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([
$app->configure('session'); class_alias(Tymon\JWTAuth\Facades\JWTAuth::class, JWTAuth::class); class_alias(Tymon\JWTAuth\Facades\JWTFactory::class, JWTFactory::class); class_alias(Illuminate\Support\Facades\View::class, View::class); $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); $app->singleton(Illuminate\Contracts\Routing\ResponseFactory::class, Illuminate\Routing\ResponseFactory::class); $app->singleton(Illuminate\Auth\AuthManager::class, function ($app) { return $app->make('auth'); }); $app->singleton(Illuminate\Cache\CacheManager::class, function ($app) { return $app->make('cache'); }); /* |-------------------------------------------------------------------------- | 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
<?php require_once __DIR__ . '/../vendor/autoload.php'; Dotenv::load(__DIR__ . '/../'); $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->withFacades(); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); $app->register(App\Providers\AppServiceProvider::class); $app->register(App\Providers\EventServiceProvider::class); $app->register(App\Providers\HttpClientServiceProvider::class); $app->configure('app'); $app->configure('composer'); $app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) { require __DIR__ . '/../app/Http/routes.php'; }); return $app;
<?php /** @var \Composer\Autoload\ClassLoader $composer */ $composer = (require_once __DIR__ . '/../vendor/autoload.php'); try { (new \Dotenv\Dotenv(__DIR__ . '/../'))->load(); } catch (\Dotenv\Exception\InvalidPathException $e) { throw $e; } $app = new Laravel\Lumen\Application(realpath(__DIR__ . '/app')); $app->withFacades(); $app->withEloquent(); $app->singleton(\Illuminate\Contracts\Debug\ExceptionHandler::class, \App\Exceptions\Handler::class); $app->register(\Chatbox\PageApp\PageAppServiceProvider::class); $app->register(\Chatbox\RestApp\RestApiServiceProvider::class); require __DIR__ . "/pageapp/router.php"; require __DIR__ . "/restapp/router.php"; return $app;
| 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__ . '/../')); /* |-------------------------------------------------------------------------- | 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->singleton(Illuminate\Cache\CacheManager::class, function ($app) { return $app->make('cache'); }); /* |-------------------------------------------------------------------------- | 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([palanik\lumen\Middleware\LumenCors::class]);
$app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../')); $app->configure('app'); $app->configure('database'); $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, Chxj1992\ApplesDataCenter\App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, Chxj1992\ApplesDataCenter\App\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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([ // Chxj1992\ApplesDataCenter\App\Http\Middleware\ExampleMiddleware::class // ]); // $app->routeMiddleware([
$app->configure('serializer'); $app->configure('rbac'); $app->configure('services'); $app->configure('mail'); $app->withFacades(); /* |-------------------------------------------------------------------------- | 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, Nord\Lumen\Core\App\Exception\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, Nettineuvoja\Common\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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([Nord\Lumen\Cors\Middleware\CorsMiddleware::class]); $app->routeMiddleware(['oauth2' => Nord\Lumen\OAuth2\Middleware\OAuth2Middleware::class]); /* |--------------------------------------------------------------------------
<?php // The Lumen micro-framework by Laravel. // // http://lumen.laravel.com // require_once __DIR__ . "/../vendor/autoload.php"; Dotenv::load(__DIR__ . "/../"); $app = new Laravel\Lumen\Application(realpath(__DIR__ . "/../")); $app->withFacades(); $app->singleton("Illuminate\\Contracts\\Debug\\ExceptionHandler", "App\\Exceptions\\Handler"); $app->singleton("Illuminate\\Contracts\\Console\\Kernel", "App\\Console\\Kernel"); require __DIR__ . "/../app/Http/routes.php"; return $app;
| */ $app = new Laravel\Lumen\Application(realpath(__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::class, Padarom\Thunderstorm\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, Padarom\Thunderstorm\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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([ // Padarom\Thunderstorm\Http\Middleware\ExampleMiddleware::class // ]); $app->routeMiddleware(['run-import' => Padarom\Thunderstorm\Http\Middleware\RunImport::class]);
| */ $app = new Laravel\Lumen\Application(realpath(__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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); $app->singleton('filesystemPublicUrl', function () use($app) { return new App\Filesystem\PublicUrlManager($app); }); /* |-------------------------------------------------------------------------- | 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([
| */ $app = new Laravel\Lumen\Application(realpath(__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::class, App\Exceptions\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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\Cookie\Middleware\EncryptCookies::class, // // Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, // // Illuminate\Session\Middleware\StartSession::class,
| */ $app = new Laravel\Lumen\Application(realpath(__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::class, Redford\Core\Exception\Handler::class); $app->singleton(Illuminate\Contracts\Console\Kernel::class, Redford\Core\Console\Kernel::class); /* |-------------------------------------------------------------------------- | 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([ // App\Http\Middleware\ExampleMiddleware::class // ]); // $app->routeMiddleware([