Kernel.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
  16. \App\Http\Middleware\TrimStrings::class,
  17. \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
  18. ];
  19. /**
  20. * The application's route middleware groups.
  21. *
  22. * @var array
  23. */
  24. protected $middlewareGroups = [
  25. 'web' => [
  26. \App\Http\Middleware\EncryptCookies::class,
  27. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  28. \Illuminate\Session\Middleware\StartSession::class,
  29. // \Illuminate\Session\Middleware\AuthenticateSession::class,
  30. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  31. \App\Http\Middleware\VerifyCsrfToken::class,
  32. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  33. ],
  34. 'api' => [
  35. 'throttle:60,1',
  36. 'bindings',
  37. ],
  38. ];
  39. /**
  40. * The application's route middleware.
  41. *
  42. * These middleware may be assigned to groups or used individually.
  43. *
  44. * @var array
  45. */
  46. protected $routeMiddleware = [
  47. 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
  48. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  49. 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
  50. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  51. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  52. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  53. ];
  54. }