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,
|
2017-06-12 07:20:43 +08:00
|
|
|
\Spatie\Pjax\Middleware\FilterIfPjax::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
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,
|
2017-06-14 04:11:11 +08:00
|
|
|
#\App\Http\Middleware\VerifyCsrfToken::class,
|
2017-06-09 02:28:26 +08:00
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
],
|
|
|
|
|
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
|
|
|
'bindings',
|
2017-12-29 12:50:07 +08:00
|
|
|
'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 = [
|
2017-12-12 12:05:22 +08:00
|
|
|
'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,
|
2017-12-29 12:50:07 +08:00
|
|
|
'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
|
|
|
];
|
|
|
|
}
|