1 | <?php |
||
14 | class PortHttpKernel extends LaravelHttpKernel |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * The application's global HTTP middleware stack. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $middleware = [ |
||
23 | // Laravel default middleware's: |
||
24 | \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, |
||
25 | // CORS package middleware |
||
26 | \Barryvdh\Cors\HandleCors::class, |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * The application's route middleware groups. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $middlewareGroups = [ |
||
35 | 'web' => [ |
||
36 | // Laravel default middleware's: |
||
37 | \App\Port\Middleware\Http\EncryptCookies::class, |
||
38 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
||
39 | \Illuminate\Session\Middleware\StartSession::class, |
||
40 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
||
41 | \App\Port\Middleware\Http\VerifyCsrfToken::class, |
||
42 | \Illuminate\Routing\Middleware\SubstituteBindings::class, |
||
43 | ], |
||
44 | 'api' => [ |
||
45 | // Laravel default middleware's: |
||
46 | 'bindings', |
||
47 | // Hello API Localization middleware |
||
48 | \App\Port\Middleware\Http\Localization::class, |
||
49 | // Dingo Package throttle middleware |
||
50 | 'api.throttle', |
||
51 | ], |
||
52 | ]; |
||
53 | |||
54 | /** |
||
55 | * The application's route middleware. |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $routeMiddleware = [ |
||
60 | |||
61 | ]; |
||
62 | |||
63 | |||
64 | /** |
||
65 | * @param array $middlewares |
||
66 | * |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function registerMiddlewares(array $middlewares = []) |
||
75 | |||
76 | /** |
||
77 | * @param array $middlewareGroups |
||
78 | * |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function registerMiddlewareGroups(array $middlewareGroups = []) |
||
87 | |||
88 | } |
||
89 |