No Description
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.

Kernel.php 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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<int, class-string|string>
  12. */
  13. protected $middleware = [
  14. // \App\Http\Middleware\TrustHosts::class,
  15. \App\Http\Middleware\TrustProxies::class,
  16. \Illuminate\Http\Middleware\HandleCors::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<string, array<int, class-string|string>>
  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\View\Middleware\ShareErrorsFromSession::class,
  33. \App\Http\Middleware\VerifyCsrfToken::class,
  34. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  35. \RealRashid\SweetAlert\ToSweetAlert::class,
  36. ],
  37. 'api' => [
  38. // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
  39. \Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
  40. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  41. ],
  42. ];
  43. /**
  44. * The application's middleware aliases.
  45. *
  46. * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
  47. *
  48. * @var array<string, class-string|string>
  49. */
  50. protected $middlewareAliases = [
  51. 'auth' => \App\Http\Middleware\Authenticate::class,
  52. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  53. 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
  54. 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
  55. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  56. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  57. 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
  58. 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
  59. 'signed' => \App\Http\Middleware\ValidateSignature::class,
  60. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  61. 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
  62. 'check.role' => \App\Http\Middleware\CheckRole::class,
  63. ];
  64. }