[c454c0f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace App\Http;
|
---|
| 4 |
|
---|
| 5 | use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
---|
| 6 |
|
---|
| 7 | class Kernel extends HttpKernel
|
---|
| 8 | {
|
---|
| 9 | /**
|
---|
| 10 | * The application's global HTTP middleware stack.
|
---|
| 11 | *
|
---|
| 12 | * These middleware are run during every request to your application.
|
---|
| 13 | *
|
---|
| 14 | * @var array<int, class-string|string>
|
---|
| 15 | */
|
---|
| 16 | protected $middleware = [
|
---|
| 17 | // \App\Http\Middleware\TrustHosts::class,
|
---|
| 18 | \App\Http\Middleware\TrustProxies::class,
|
---|
| 19 | \Illuminate\Http\Middleware\HandleCors::class,
|
---|
| 20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
---|
| 21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
---|
| 22 | \App\Http\Middleware\TrimStrings::class,
|
---|
| 23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
---|
| 24 | ];
|
---|
[5372778] | 25 | protected $routeMiddleware = [
|
---|
| 26 | // other middleware
|
---|
| 27 | 'policeman' => \App\Http\Middleware\CheckPoliceman::class,
|
---|
| 28 | 'officer' => \App\Http\Middleware\CheckOfficer::class,
|
---|
| 29 | 'both' => \App\Http\Middleware\CheckBoth::class,
|
---|
| 30 | ];
|
---|
[c454c0f] | 31 |
|
---|
| 32 | /**
|
---|
| 33 | * The application's route middleware groups.
|
---|
| 34 | *
|
---|
| 35 | * @var array<string, array<int, class-string|string>>
|
---|
| 36 | */
|
---|
| 37 | protected $middlewareGroups = [
|
---|
| 38 | 'web' => [
|
---|
| 39 | \App\Http\Middleware\EncryptCookies::class,
|
---|
| 40 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
---|
| 41 | \Illuminate\Session\Middleware\StartSession::class,
|
---|
| 42 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
---|
| 43 | \App\Http\Middleware\VerifyCsrfToken::class,
|
---|
| 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
---|
| 45 | ],
|
---|
| 46 |
|
---|
| 47 | 'api' => [
|
---|
| 48 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
---|
| 49 | \Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
|
---|
| 50 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
---|
| 51 | ],
|
---|
| 52 | ];
|
---|
| 53 |
|
---|
| 54 | /**
|
---|
| 55 | * The application's middleware aliases.
|
---|
| 56 | *
|
---|
| 57 | * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
|
---|
| 58 | *
|
---|
| 59 | * @var array<string, class-string|string>
|
---|
| 60 | */
|
---|
| 61 | protected $middlewareAliases = [
|
---|
| 62 | 'auth' => \App\Http\Middleware\Authenticate::class,
|
---|
| 63 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
---|
| 64 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
---|
| 65 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
---|
| 66 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
---|
| 67 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
---|
| 68 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
---|
| 69 | 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
|
---|
| 70 | 'signed' => \App\Http\Middleware\ValidateSignature::class,
|
---|
| 71 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
---|
| 72 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
---|
| 73 | ];
|
---|
| 74 | }
|
---|