| <?php namespace App\Http; |
| |
| use Clockwork\Support\Laravel\ClockworkMiddleware; |
| use Illuminate\Foundation\Http\Kernel as HttpKernel; |
| |
| class Kernel extends HttpKernel { |
| |
| |
| |
| |
| |
| |
| protected $middleware = [ |
| 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', |
| 'Illuminate\Cookie\Middleware\EncryptCookies', |
| 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', |
| 'Illuminate\Session\Middleware\StartSession', |
| 'Illuminate\View\Middleware\ShareErrorsFromSession', |
| 'App\Http\Middleware\VerifyCsrfToken', |
| ]; |
| |
| |
| |
| |
| |
| |
| |
| protected $routeMiddleware = [ |
| 'auth' => 'App\Http\Middleware\Authenticate', |
| 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth', |
| 'guest' => 'App\Http\Middleware\RedirectIfAuthenticated', |
| ]; |
| |
| protected function handle($request) |
| { |
| if (config('app.debug')) |
| { |
| $this->middleware[] = ClockworkMiddleware::class; |
| } |
| |
| return parent::handle($request); |
| } |
| |
| } |