|
70 | 70 | if (Features::enabled(Features::registration())) {
|
71 | 71 | if ($enableViews) {
|
72 | 72 | Route::get(RoutePath::for('register', '/register'), [RegisteredUserController::class, 'create'])
|
73 |
| - ->middleware(array_filter([ |
74 |
| - 'guest:'.config('fortify.guard'), |
75 |
| - $registrationLimiter ? 'throttle:'.$registrationLimiter : null, |
76 |
| - ])) |
| 73 | + ->middleware(['guest:'.config('fortify.guard')]) |
77 | 74 | ->name('register');
|
78 | 75 | }
|
79 | 76 |
|
|
93 | 90 | }
|
94 | 91 |
|
95 | 92 | Route::get(RoutePath::for('verification.verify', '/email/verify/{id}/{hash}'), [VerifyEmailController::class, '__invoke'])
|
96 |
| - ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard'), 'signed', 'throttle:'.$verificationLimiter]) |
| 93 | + ->middleware(array_filter([ |
| 94 | + config('fortify.auth_middleware', 'auth').':'.config('fortify.guard'), |
| 95 | + 'signed', |
| 96 | + $verificationLimiter ? 'throttle:'.$verificationLimiter : null, |
| 97 | + ])) |
97 | 98 | ->name('verification.verify');
|
98 | 99 |
|
99 | 100 | Route::post(RoutePath::for('verification.send', '/email/verification-notification'), [EmailVerificationNotificationController::class, 'store'])
|
100 |
| - ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard'), 'throttle:'.$verificationLimiter]) |
| 101 | + ->middleware(array_filter([ |
| 102 | + config('fortify.auth_middleware', 'auth').':'.config('fortify.guard'), |
| 103 | + $verificationLimiter ? 'throttle:'.$verificationLimiter : null, |
| 104 | + ])) |
101 | 105 | ->name('verification.send');
|
102 | 106 | }
|
103 | 107 |
|
|
0 commit comments