Esempio n. 1
0
File: app.php Progetto: p--b/demeter
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, Demeter\Exceptions\Handler::class);
$app->singleton(Illuminate\Contracts\Console\Kernel::class, Demeter\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(['auth' => Demeter\Http\Middleware\Authenticate::class]);
// $app->middleware([Illuminate\Session\Middleware\StartSession::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(Demeter\Providers\CmdServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
Esempio n. 2
0
 */
$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']);
// $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');
/*
Esempio n. 3
0
|
*/
$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, 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->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
Esempio n. 4
0
|
*/
$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->routeMiddleware(['jwt.auth' => Tymon\JWTAuth\Middleware\GetUserFromToken::class, 'jwt.refresh' => Tymon\JWTAuth\Middleware\RefreshToken::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);
$app->register('Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider');
/*
|--------------------------------------------------------------------------
Esempio n. 5
0
|
*/
$app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'App\\Exceptions\\Handler');
$app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'App\\Console\\Kernel');
/*
|--------------------------------------------------------------------------
| 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(['LucaDegasperi\\OAuth2Server\\Middleware\\OAuthExceptionHandlerMiddleware', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse']);
$app->routeMiddleware(['check-authorization-params' => 'Optimus\\OAuth2Server\\Middleware\\CheckAuthCodeRequestMiddleware', 'csrf' => 'Laravel\\Lumen\\Http\\Middleware\\VerifyCsrfToken', 'oauth' => 'Optimus\\OAuth2Server\\Middleware\\OAuthMiddleware', 'oauth-owner' => 'Optimus\\OAuth2Server\\Middleware\\OAuthOwnerMiddleware']);
/*
|--------------------------------------------------------------------------
| 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('LucaDegasperi\\OAuth2Server\\Storage\\FluentStorageServiceProvider');
$app->register('Optimus\\OAuth2Server\\OAuth2ServerServiceProvider');
/*
|--------------------------------------------------------------------------
| Load The Application Routes
Esempio n. 6
0
File: app.php Progetto: kubill/lumen
|
*/
$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, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class]);
$app->routeMiddleware(['auth' => 'App\\Http\\Middleware\\AuthMiddleware']);
/*
|--------------------------------------------------------------------------
| 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
Esempio n. 7
0
|
| 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,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
// $app->routeMiddleware([
// ]);
$app->routeMiddleware(['jwtauth' => App\Http\Middleware\JwtAuthMiddleware::class, 'jwtrefresh' => App\Http\Middleware\TokenRefreshMiddleware::class, 'cors' => App\Http\Middleware\CorsMiddleware::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
Esempio n. 8
0
|
*/
$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, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class]);
$app->routeMiddleware(['csrf' => Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class, 'auth' => App\Http\Middleware\Authenticate::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);
$app->register(Intervention\Image\ImageServiceProvider::class);
/*
|--------------------------------------------------------------------------
Esempio n. 9
0
|
*/
$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([\Neomerx\CorsIlluminate\CorsMiddleware::class]);
$app->routeMiddleware(['auth' => \Neomerx\Limoncello\Http\AuthMiddleware::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);
$app->register(\Neomerx\Limoncello\Providers\LumenServiceProvider::class);
$app->register(\Neomerx\CorsIlluminate\Providers\LumenServiceProvider::class);
Esempio n. 10
0
| 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',
//     // 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
//     // 'Illuminate\Session\Middleware\StartSession',
//     // 'Illuminate\View\Middleware\ShareErrorsFromSession',
//     // 'Laravel\Lumen\Http\Middleware\VerifyCsrfToken',
// ]);
$app->routeMiddleware(['auth' => 'Hexcores\\Api\\Http\\Middleware\\VerifyApiRequestHeader']);
// $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.
|
*/
// Register mongo_lite component
$app->register('Hexcores\\MongoLite\\Laravel\\MongoLiteServiceProvider');
// Register the main application
Esempio n. 11
0
|
*/
$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([\LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class]);
$app->routeMiddleware(['oauth' => \LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::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);
$app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class);
$app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::class);
Esempio n. 12
0
|
*/
$app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'App\\Exceptions\\Handler');
$app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'App\\Console\\Kernel');
/*
|--------------------------------------------------------------------------
| 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', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', 'Illuminate\\Session\\Middleware\\StartSession', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', 'Laravel\\Lumen\\Http\\Middleware\\VerifyCsrfToken', 'App\\Http\\Middleware\\DbLogging']);
$app->routeMiddleware(['auth' => 'App\\Http\\Middleware\\AuthMiddleware', 'admin' => 'App\\Http\\Middleware\\AdminMiddleware', 'guest' => 'App\\Http\\Middleware\\GuestMiddleware']);
/*
|--------------------------------------------------------------------------
| 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');
// DEBUG
$app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
/*
|--------------------------------------------------------------------------
Esempio n. 13
0
|
*/
$app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'App\\Exceptions\\Handler');
$app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'App\\Console\\Kernel');
/*
|--------------------------------------------------------------------------
| 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', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', 'Illuminate\\Session\\Middleware\\StartSession', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', 'Laravel\\Lumen\\Http\\Middleware\\VerifyCsrfToken']);
$app->routeMiddleware(['auth' => 'App\\Http\\Middleware\\Authenticate', 'guest' => 'App\\Http\\Middleware\\RedirectIfAuthenticated']);
/*
|--------------------------------------------------------------------------
| 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');
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
Esempio n. 14
0
|
*/
$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\CorsMiddleware::class]);
$app->routeMiddleware(['cors' => App\Http\Middleware\CorsMiddleware::class, 'auth' => App\Http\Middleware\Authenticate::class, 'auth.web' => App\Http\Middleware\AuthenticateWeb::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\CatchAllOptionsRequestsProvider::class);
$app->register(App\Providers\EventServiceProvider::class);
$app->register(App\Providers\ValidatorServiceProvider::class);
Esempio n. 15
0
|--------------------------------------------------------------------------
| 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([
//     'auth' => App\Http\Middleware\Authenticate::class,
// ]);
$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);
/*
|--------------------------------------------------------------------------
Esempio n. 16
0
|
*/
$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, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class]);
$app->routeMiddleware(['auth' => App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'csrf' => App\Http\Middleware\VerifyCsrfToken::class, 'guest' => App\Http\Middleware\RedirectIfAuthenticated::class, 'locale' => App\Http\Middleware\Localization::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
Esempio n. 17
0
| 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->middleware([\LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class]);
// $app->routeMiddleware([
//     'auth' => App\Http\Middleware\Authenticate::class,
// ]);
$app->routeMiddleware(['check-authorization-params' => \LucaDegasperi\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware::class, 'csrf' => \Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class, 'oauth' => \LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::class, 'oauth-client' => \LucaDegasperi\OAuth2Server\Middleware\OAuthClientOwnerMiddleware::class, 'oauth-user' => \LucaDegasperi\OAuth2Server\Middleware\OAuthUserOwnerMiddleware::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);
$app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class);
$app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::class);
Esempio n. 18
0
| 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,
  Illuminate\View\Middleware\ShareErrorsFromSession::class,
  Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
]); */
$app->routeMiddleware([Laravel\Lumen\Http\Middleware\VerifyCsrfToken::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
Esempio n. 19
0
| 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,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
$app->routeMiddleware(['bot' => 'Asuka\\Http\\Middleware\\BotMiddleware']);
/*
|--------------------------------------------------------------------------
| 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(Telegram\Bot\Laravel\TelegramServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
Esempio n. 20
0
|
*/
$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\Session\Middleware\StartSession::class]);
$app->routeMiddleware(['cross' => 'App\\Http\\Middleware\\ExampleMiddleware']);
/*
|--------------------------------------------------------------------------
| 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
Esempio n. 21
0
*/
$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]);
/*
|--------------------------------------------------------------------------
| 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' => 'Padarom\\Thunderstorm\\Http\\Controllers', 'middleware' => 'run-import'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Esempio n. 22
0
| 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,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
$app->routeMiddleware(['token' => 'App\\Http\\Middleware\\TokenMiddleware', 'filter' => 'App\\Http\\Middleware\\FilterMiddleware']);
/*
|--------------------------------------------------------------------------
| 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
Esempio n. 23
0
|
*/
$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, Illuminate\View\Middleware\ShareErrorsFromSession::class]);
$app->routeMiddleware(['old' => 'App\\Http\\Middleware\\OldMiddleware', 'name' => 'App\\Http\\Middleware\\NameMiddleware']);
/*
|--------------------------------------------------------------------------
| 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
Esempio n. 24
0
|
*/
$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]);
/*
|--------------------------------------------------------------------------
| 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.
|
*/
// CORS
$app->register(Nord\Lumen\Cors\CorsServiceProvider::class);
// Doctrine
$app->register(Nord\Lumen\Doctrine\ORM\DoctrineServiceProvider::class);
// OAuth2
Esempio n. 25
0
|
*/
$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\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class, LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class]);
$app->routeMiddleware(['check-authorization-params' => LucaDegasperi\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware::class, 'oauth' => LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::class, 'oauth-owner' => LucaDegasperi\OAuth2Server\Middleware\OAuthOwnerMiddleware::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\ServiceProvider::class);
$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class);
Esempio n. 26
0
|
*/
$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([\Neomerx\CorsIlluminate\CorsMiddleware::class]);
$app->routeMiddleware(['jsonapi.basicAuth' => \App\Http\Middleware\JsonApiBasicAuth::class, 'jsonapi.jwtAuth' => \App\Http\Middleware\JsonApiJwtAuth::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);
$app->register(\Neomerx\CorsIlluminate\Providers\LumenServiceProvider::class);
/*
|--------------------------------------------------------------------------
Esempio n. 27
0
| 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);
/*
|--------------------------------------------------------------------------
| 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(['referer_saver' => 'App\\Http\\Middleware\\RefererSaverMiddleware', 'request_log' => 'App\\Http\\Middleware\\RequestLogMiddleware']);
/*
|--------------------------------------------------------------------------
| 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\RequestLogServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
Esempio n. 28
0
|--------------------------------------------------------------------------
|
| 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([\LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class]);
// $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(['oauth' => \LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::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
Esempio n. 29
0
| 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,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
$app->routeMiddleware(['auth' => App\Http\Middleware\AuthMiddleware::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
Esempio n. 30
0
|
*/
$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, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class]);
$app->routeMiddleware(['auth.admin' => 'App\\Http\\Middleware\\Auth\\AdminMiddleware']);
/*
|--------------------------------------------------------------------------
| 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