Kernel.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Http;
  3. use Illuminate\Foundation\Http\Kernel as HttpKernel;
  4. class Kernel extends HttpKernel
  5. {
  6. protected $middleware = [
  7. \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
  8. ];
  9. protected $middlewareGroups = [
  10. 'web' => [
  11. \App\Http\Middleware\EncryptCookies::class,
  12. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  13. \Illuminate\Session\Middleware\StartSession::class,
  14. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  15. \App\Http\Middleware\VerifyCsrfToken::class,
  16. ],
  17. 'api' => [
  18. 'throttle:60,1',
  19. ],
  20. ];
  21. protected $routeMiddleware = [
  22. 'auth' => \App\Http\Middleware\Authenticate::class,
  23. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  24. 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
  25. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  26. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  27. 'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
  28. 'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
  29. 'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
  30. 'cors' => \App\Http\Middleware\Cors::class,
  31. ];
  32. }