Kernel.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  29. ],
  30. 'api' => [
  31. 'throttle:60,1',
  32. 'bindings',
  33. ],
  34. ];
  35. /**
  36. * The application's route middleware.
  37. *
  38. * These middleware may be assigned to groups or used individually.
  39. *
  40. * @var array
  41. */
  42. protected $routeMiddleware = [
  43. 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
  44. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  45. 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
  46. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  47. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  48. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  49. ];
  50. }