Skip to content

Commit 18fe2d2

Browse files
authored
Refactor $middlewareAliases in Kernel.php for clarity about custom middleware (#1116)
Refactor `$middlewareAliases` to make it clear what is middleware from upstream Laravel, and what is our custom middleware
1 parent 1ad67b0 commit 18fe2d2

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

app/Http/Kernel.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,16 @@ class Kernel extends HttpKernel {
4444
* @var array
4545
*/
4646
protected $middlewareAliases = [
47-
// Came with Laravel
48-
'auth' => Authenticate::class,
47+
// Middleware from laravel upstream
4948
'verified' => EnsureEmailIsVerified::class,
5049

50+
// Custom Middleware
5151
'guest' => RedirectIfAuthenticated::class,
5252
'limit_wiki_access' => LimitWikiAccess::class,
53-
54-
// https://laravel-news.com/signed-routes
55-
// 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
56-
5753
'backend.auth' => BackendAuth::class,
5854
'throttle.signup' => ThrottleSignup::class,
5955
'throttle' => Throttle::class,
60-
// 'auth' => App\Http\Middleware\Authenticate::class,
56+
'auth' => Authenticate::class,
6157
];
6258

6359
/**

0 commit comments

Comments
 (0)