Kernel.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Http;
  3. use Illuminate\Foundation\Http\Kernel as HttpKernel;
  4. class Kernel extends HttpKernel
  5. {
  6. /**
  7. * The application's global HTTP middleware stack.
  8. *
  9. * These middleware are run during every request to your application.
  10. *
  11. * @var array
  12. */
  13. protected $middleware = [
  14. \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
  15. ];
  16. /**
  17. * The application's route middleware groups.
  18. *
  19. * @var array
  20. */
  21. protected $middlewareGroups = [
  22. 'web' => [
  23. \App\Http\Middleware\EncryptCookies::class,
  24. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  25. \Illuminate\Session\Middleware\StartSession::class,
  26. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  27. \App\Http\Middleware\VerifyCsrfToken::class,
  28. ],
  29. 'api' => [
  30. 'throttle:60,1',
  31. ],
  32. ];
  33. /**
  34. * The application's route middleware.
  35. *
  36. * These middleware may be assigned to groups or used individually.
  37. *
  38. * @var array
  39. */
  40. protected $routeMiddleware = [
  41. 'auth' => \App\Http\Middleware\Authenticate::class,
  42. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  43. 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
  44. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  45. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  46. ];
  47. }