企微短剧业务系统

Kernel.php 2.1KB

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