Skip to content

Commit 0564e04

Browse files
authored
Update fortify.md (#6979)
There are a small documentation inconsistencies for declaring views. Some code examples are in php 7.4 syntax instead of 7.3. And, having in mind, that Laravel 8 minimum requirement is php 7.3, then syntax from php 7.4 (new features) are not correct in this context. Code examples that are NOT OK (7.4 syntax used - closure), are for: - Login (https://laravel.com/docs/8.x/fortify#authentication) - Registration (https://laravel.com/docs/8.x/fortify#registration) - Email Verification (https://laravel.com/docs/8.x/fortify#email-verification) Code examples that are OK (7.3 syntax), are for: - Requesting A Password Reset Link (https://laravel.com/docs/8.x/fortify#requesting-a-password-reset-link) - Resetting The Password (https://laravel.com/docs/8.x/fortify#resetting-the-password) - ... I did not check the whole documentation, so please do that in the context of php syntax (to be valid with php 7.3). Thank you, and best wishes.
1 parent 29cae8b commit 0564e04

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fortify.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ All of the authentication view's rendering logic may be customized using the app
136136
*/
137137
public function boot()
138138
{
139-
Fortify::loginView(fn () => view('auth.login'));
139+
Fortify::loginView(function () {
140+
return view('auth.login');
141+
});
140142

141143
// ...
142144
}
@@ -298,7 +300,9 @@ use Laravel\Fortify\Fortify;
298300
*/
299301
public function boot()
300302
{
301-
Fortify::registerView(fn () => view('auth.register'));
303+
Fortify::registerView(function () {
304+
return view('auth.register');
305+
});
302306

303307
// ...
304308
}
@@ -436,7 +440,9 @@ use Laravel\Fortify\Fortify;
436440
*/
437441
public function boot()
438442
{
439-
Fortify::verifyEmailView(fn () => view('auth.verify-email'));
443+
Fortify::verifyEmailView(function () {
444+
return view('auth.verify-email');
445+
});
440446

441447
// ...
442448
}

0 commit comments

Comments
 (0)