2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
|
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
protected $middleware = [
|
|
|
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
2018-01-24 01:46:26 +08:00
|
|
|
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
|
|
|
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2017-12-17 02:01:21 +08:00
|
|
|
\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,
|
2018-03-12 23:33:46 +08:00
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2018-03-24 04:02:26 +08:00
|
|
|
//\Spatie\Pjax\Middleware\FilterIfPjax::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
|
|
|
'bindings',
|
2017-12-29 12:50:07 +08:00
|
|
|
'json',
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
|
|
|
];
|
|
|
|
protected $routeMiddleware = [
|
2018-03-20 09:50:40 +08:00
|
|
|
'api.auth' => \App\Http\Middleware\ApiAuth::class,
|
|
|
|
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
2018-03-20 09:50:40 +08:00
|
|
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
|
|
|
'json' => \App\Http\Middleware\JsonResponse::class,
|
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|
|
|
|
}
|