You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.4 KiB

4 years ago
4 years ago
4 years ago
  1. <?php
  2. namespace App\Http;
  3. use App\Utilities\Middlewares\BindBusinessInfo;
  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. // \App\Http\Middleware\TrustHosts::class,
  16. \App\Http\Middleware\TrustProxies::class,
  17. \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
  18. \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
  19. \App\Http\Middleware\TrimStrings::class,
  20. \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
  21. ];
  22. /**
  23. * The application's route middleware groups.
  24. *
  25. * @var array
  26. */
  27. protected $middlewareGroups = [
  28. 'web' => [
  29. \App\Http\Middleware\EncryptCookies::class,
  30. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  31. \Illuminate\Session\Middleware\StartSession::class,
  32. // \Illuminate\Session\Middleware\AuthenticateSession::class,
  33. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  34. \App\Http\Middleware\VerifyCsrfToken::class,
  35. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  36. ],
  37. 'api' => [
  38. 'throttle:api',
  39. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  40. ],
  41. ];
  42. /**
  43. * The application's route middleware.
  44. *
  45. * These middleware may be assigned to groups or used individually.
  46. *
  47. * @var array
  48. */
  49. protected $routeMiddleware = [
  50. 'auth' => \App\Http\Middleware\Authenticate::class,
  51. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  52. 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
  53. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  54. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  55. 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
  56. 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
  57. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  58. 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
  59. 'bindBusiness' => BindBusinessInfo::class,
  60. ];
  61. }