|
35 | 35 | $twoFactorLimiter = config('fortify.limiters.two-factor');
|
36 | 36 | $verificationLimiter = config('fortify.limiters.verification', '6,1');
|
37 | 37 |
|
38 |
| - $login = Route::post(RoutePath::for('login', '/login'), [AuthenticatedSessionController::class, 'store']) |
| 38 | + Route::post(RoutePath::for('login', '/login'), [AuthenticatedSessionController::class, 'store']) |
39 | 39 | ->middleware(array_filter([
|
40 | 40 | 'guest:'.config('fortify.guard'),
|
41 | 41 | $limiter ? 'throttle:'.$limiter : null,
|
42 |
| - ])); |
43 |
| - |
44 |
| - if (! $enableViews) { |
45 |
| - $login->name('login'); |
46 |
| - } |
| 42 | + ]))->name('login.store'); |
47 | 43 |
|
48 | 44 | Route::post(RoutePath::for('logout', '/logout'), [AuthenticatedSessionController::class, 'destroy'])
|
49 | 45 | ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard')])
|
|
78 | 74 | ->name('register');
|
79 | 75 | }
|
80 | 76 |
|
81 |
| - $register = Route::post(RoutePath::for('register', '/register'), [RegisteredUserController::class, 'store']) |
82 |
| - ->middleware(['guest:'.config('fortify.guard')]); |
83 |
| - |
84 |
| - if (! $enableViews) { |
85 |
| - $register->name('register'); |
86 |
| - } |
| 77 | + Route::post(RoutePath::for('register', '/register'), [RegisteredUserController::class, 'store']) |
| 78 | + ->middleware(['guest:'.config('fortify.guard')]) |
| 79 | + ->name('register.store'); |
87 | 80 | }
|
88 | 81 |
|
89 | 82 | // Email Verification...
|
|
128 | 121 | ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard')])
|
129 | 122 | ->name('password.confirmation');
|
130 | 123 |
|
131 |
| - $passwordConfirm = Route::post(RoutePath::for('password.confirm', '/user/confirm-password'), [ConfirmablePasswordController::class, 'store']) |
132 |
| - ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard')]); |
133 |
| - |
134 |
| - if (! $enableViews) { |
135 |
| - $passwordConfirm->name('password.confirm'); |
136 |
| - } |
| 124 | + Route::post(RoutePath::for('password.confirm', '/user/confirm-password'), [ConfirmablePasswordController::class, 'store']) |
| 125 | + ->middleware([config('fortify.auth_middleware', 'auth').':'.config('fortify.guard')]) |
| 126 | + ->name('password.confirm.store'); |
137 | 127 |
|
138 | 128 | // Two Factor Authentication...
|
139 | 129 | if (Features::enabled(Features::twoFactorAuthentication())) {
|
|
143 | 133 | ->name('two-factor.login');
|
144 | 134 | }
|
145 | 135 |
|
146 |
| - $twoFactorLogin = Route::post(RoutePath::for('two-factor.login', '/two-factor-challenge'), [TwoFactorAuthenticatedSessionController::class, 'store']) |
| 136 | + Route::post(RoutePath::for('two-factor.login', '/two-factor-challenge'), [TwoFactorAuthenticatedSessionController::class, 'store']) |
147 | 137 | ->middleware(array_filter([
|
148 | 138 | 'guest:'.config('fortify.guard'),
|
149 | 139 | $twoFactorLimiter ? 'throttle:'.$twoFactorLimiter : null,
|
150 |
| - ])); |
151 |
| - |
152 |
| - if (! $enableViews) { |
153 |
| - $twoFactorLogin->name('two-factor.login'); |
154 |
| - } |
| 140 | + ]))->name('two-factor.login.store'); |
155 | 141 |
|
156 | 142 | $twoFactorMiddleware = Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword')
|
157 | 143 | ? [config('fortify.auth_middleware', 'auth').':'.config('fortify.guard'), 'password.confirm']
|
|
0 commit comments