app/Http/Kernel.php
<?php
namespace Strimoid\Http;
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
use Illuminate\Auth\Middleware\Authorize;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
Middleware\TrustProxies::class,
];
/**
* The application's route middleware groups.
*/
protected $middlewareGroups = [
'web' => [
'bindings',
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
ShareErrorsFromSession::class,
Middleware\Locale::class,
Middleware\VerifyCsrfToken::class,
Middleware\NotificationMarkRead::class,
// TODO: needs to be updated for new version of Pjax
// Middleware\Pjax::class,
],
'api' => [
'bindings',
'throttle:60,1',
],
];
/**
* The application's route middleware.
*/
protected $routeMiddleware = [
'auth' => Middleware\Authenticate::class,
'auth.basic' => AuthenticateWithBasicAuth::class,
'bindings' => SubstituteBindings::class,
'can' => Authorize::class,
'guest' => Middleware\RedirectIfAuthenticated::class,
];
}