Kernel.php 2.1 KB

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