phpvms/app/Http/Kernel.php

65 lines
2.1 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\InstalledCheck::class,
2017-06-09 02:28:26 +08:00
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
#\App\Http\Middleware\VerifyCsrfToken::class,
2017-06-09 02:28:26 +08:00
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Spatie\Pjax\Middleware\FilterIfPjax::class,
2017-06-09 02:28:26 +08:00
],
'api' => [
'throttle:60,1',
'bindings',
'json',
2017-06-09 02:28:26 +08:00
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'api.auth' => \App\Http\Middleware\ApiAuth::class,
2017-06-09 02:28:26 +08:00
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'json' => \App\Http\Middleware\JsonResponse::class,
2017-06-09 02:28:26 +08:00
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
2017-12-16 02:36:13 +08:00
#'role' => \Laratrust\Middleware\LaratrustRole::class,
#'permission' => \Laratrust\Middleware\LaratrustPermission::class,
#'ability' => \Laratrust\Middleware\LaratrustAbility::class,
2017-06-09 02:28:26 +08:00
];
}