Kernel.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace App\Http;
  3. use Illuminate\Foundation\Http\Kernel as HttpKernel;
  4. /**
  5. * HTTP 内核类
  6. *
  7. * 负责处理 HTTP 请求的中间件配置和路由中间件管理,继承自 Laravel 的 HTTP 内核
  8. */
  9. class Kernel extends HttpKernel
  10. {
  11. /**
  12. * The application's global HTTP middleware stack.
  13. *
  14. * @var array<int, class-string|string>
  15. */
  16. protected $middleware = [
  17. // ... existing code ...
  18. ];
  19. /**
  20. * The application's route middleware groups.
  21. *
  22. * @var array<string, array<int, class-string|string>>
  23. */
  24. protected $middlewareGroups = [
  25. 'web' => [
  26. // ... existing code ...
  27. ],
  28. 'api' => [
  29. // ... existing code ...
  30. ],
  31. ];
  32. /**
  33. * The application's middleware aliases.
  34. *
  35. * @var array<string, class-string|string>
  36. */
  37. protected $middlewareAliases = [
  38. // ... existing code ...
  39. ];
  40. /**
  41. * The bootstrap classes for the application.
  42. *
  43. * @var array
  44. */
  45. protected $bootstrappers = [
  46. \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
  47. \Illuminate\Foundation\Bootstrap\LoadConfiguration::class,
  48. \Illuminate\Foundation\Bootstrap\HandleExceptions::class,
  49. \Illuminate\Foundation\Bootstrap\RegisterFacades::class,
  50. \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
  51. \Illuminate\Foundation\Bootstrap\BootProviders::class
  52. ];
  53. /**
  54. * The application's route middleware.
  55. *
  56. * These middleware may be assigned to groups or used individually.
  57. *
  58. * @var array<string, class-string|string>
  59. */
  60. protected $routeMiddleware = [
  61. // ... existing middleware ...
  62. ];
  63. }