|
5 | 5 | use Illuminate\Foundation\Configuration\Exceptions;
|
6 | 6 | use Illuminate\Foundation\Configuration\Middleware;
|
7 | 7 |
|
8 |
| -return Application::configure(basePath: dirname(__DIR__)) |
| 8 | +return Application::configure(basePath: \dirname(__DIR__)) |
9 | 9 | ->withProviders([
|
10 |
| - \Assada\Achievements\AchievementsServiceProvider::class, |
11 |
| - \Spatie\CookieConsent\CookieConsentServiceProvider::class, |
12 |
| - \Intervention\Image\ImageServiceProvider::class, |
13 |
| - \App\Providers\FortifyServiceProvider::class, |
| 10 | + Assada\Achievements\AchievementsServiceProvider::class, |
| 11 | + Spatie\CookieConsent\CookieConsentServiceProvider::class, |
| 12 | + Intervention\Image\ImageServiceProvider::class, |
| 13 | + App\Providers\FortifyServiceProvider::class, |
14 | 14 | ])
|
15 | 15 | ->withRouting(
|
16 | 16 | web: __DIR__.'/../routes/web.php',
|
|
19 | 19 | channels: __DIR__.'/../routes/channels.php',
|
20 | 20 | health: '/up',
|
21 | 21 | )
|
22 |
| - ->withMiddleware(function (Middleware $middleware) { |
| 22 | + ->withMiddleware(function (Middleware $middleware): void { |
23 | 23 | $middleware->redirectGuestsTo(fn () => route('login'));
|
24 | 24 | $middleware->redirectUsersTo(AppServiceProvider::HOME);
|
25 | 25 |
|
26 | 26 | $middleware->throttleWithRedis();
|
27 | 27 |
|
28 |
| - $middleware->append(\App\Http\Middleware\BlockIpAddress::class); |
| 28 | + $middleware->append(App\Http\Middleware\BlockIpAddress::class); |
29 | 29 |
|
30 | 30 | $middleware->web([
|
31 |
| - \Illuminate\Session\Middleware\AuthenticateSession::class, |
32 |
| - \App\Http\Middleware\UpdateLastAction::class, |
33 |
| - \HDVinnie\SecureHeaders\SecureHeadersMiddleware::class, |
| 31 | + Illuminate\Session\Middleware\AuthenticateSession::class, |
| 32 | + App\Http\Middleware\UpdateLastAction::class, |
| 33 | + HDVinnie\SecureHeaders\SecureHeadersMiddleware::class, |
34 | 34 | 'throttle:web',
|
35 | 35 | ]);
|
36 | 36 |
|
37 | 37 | $middleware->api('throttle:api');
|
38 | 38 |
|
39 | 39 | $middleware->group('chat', [
|
40 |
| - \App\Http\Middleware\EncryptCookies::class, |
41 |
| - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
42 |
| - \Illuminate\Session\Middleware\StartSession::class, |
43 |
| - \Illuminate\Session\Middleware\AuthenticateSession::class, |
44 |
| - \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
45 |
| - \Illuminate\Routing\Middleware\SubstituteBindings::class, |
46 |
| - \App\Http\Middleware\VerifyCsrfToken::class, |
47 |
| - \App\Http\Middleware\UpdateLastAction::class, |
48 |
| - \HDVinnie\SecureHeaders\SecureHeadersMiddleware::class, |
| 40 | + App\Http\Middleware\EncryptCookies::class, |
| 41 | + Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
| 42 | + Illuminate\Session\Middleware\StartSession::class, |
| 43 | + Illuminate\Session\Middleware\AuthenticateSession::class, |
| 44 | + Illuminate\View\Middleware\ShareErrorsFromSession::class, |
| 45 | + Illuminate\Routing\Middleware\SubstituteBindings::class, |
| 46 | + App\Http\Middleware\VerifyCsrfToken::class, |
| 47 | + App\Http\Middleware\UpdateLastAction::class, |
| 48 | + HDVinnie\SecureHeaders\SecureHeadersMiddleware::class, |
49 | 49 | 'throttle:chat',
|
50 | 50 | ]);
|
51 | 51 |
|
|
57 | 57 | 'throttle:rss',
|
58 | 58 | ]);
|
59 | 59 |
|
60 |
| - $middleware->replace(\Illuminate\Foundation\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class); |
61 |
| - $middleware->replace(\Illuminate\Http\Middleware\TrustProxies::class, \App\Http\Middleware\TrustProxies::class); |
| 60 | + $middleware->replace(Illuminate\Foundation\Http\Middleware\TrimStrings::class, App\Http\Middleware\TrimStrings::class); |
| 61 | + $middleware->replace(Illuminate\Http\Middleware\TrustProxies::class, App\Http\Middleware\TrustProxies::class); |
62 | 62 |
|
63 | 63 | $middleware->alias([
|
64 |
| - 'admin' => \App\Http\Middleware\CheckForAdmin::class, |
65 |
| - 'banned' => \App\Http\Middleware\CheckIfBanned::class, |
66 |
| - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, |
67 |
| - 'language' => \App\Http\Middleware\SetLanguage::class, |
68 |
| - 'modo' => \App\Http\Middleware\CheckForModo::class, |
69 |
| - 'owner' => \App\Http\Middleware\CheckForOwner::class, |
| 64 | + 'admin' => App\Http\Middleware\CheckForAdmin::class, |
| 65 | + 'banned' => App\Http\Middleware\CheckIfBanned::class, |
| 66 | + 'bindings' => Illuminate\Routing\Middleware\SubstituteBindings::class, |
| 67 | + 'language' => App\Http\Middleware\SetLanguage::class, |
| 68 | + 'modo' => App\Http\Middleware\CheckForModo::class, |
| 69 | + 'owner' => App\Http\Middleware\CheckForOwner::class, |
70 | 70 | ]);
|
71 | 71 | })
|
72 |
| - ->withExceptions(function (Exceptions $exceptions) { |
| 72 | + ->withExceptions(function (Exceptions $exceptions): void { |
73 | 73 | $exceptions->dontReport([
|
74 |
| - \Illuminate\Queue\MaxAttemptsExceededException::class, |
| 74 | + Illuminate\Queue\MaxAttemptsExceededException::class, |
75 | 75 | ]);
|
76 | 76 |
|
77 | 77 | $exceptions->reportable(function (Throwable $e): void {
|
|
0 commit comments