We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined variable: request in reset-password.blade.php when I override view forgot-password
reset-password.blade.php
forgot-password
Clean installation Laravel Framework 8.4.0 without any auth scaffolding.
Db migration and seed - it's ok!
Then:
composer require laravel/fortify
and php artisan vendor:publish...
php artisan migrate
It's ok!
Created in FortifyServiceProvider in boot() :
FortifyServiceProvider
boot()
Fortify::requestPasswordResetLinkView(function () { return view('admin.auth.forgot-password'); }); Fortify::resetPasswordView(function () { return view('admin.auth.reset-password'); });
And created views in view/admin/auth folder: forgot-password.blade.php
view/admin/auth
forgot-password.blade.php
<form method="POST" action="/forgot-password"> @csrf <input id="email" type="email" name="email" value="{{ old('email') }}" required> <button type="submit"> {{ __('Send Password Reset Link') }} </button> </form>
<form method="POST" action="/reset-password"> @csrf <input type="hidden" name="token" value="{{ $request->route('token') }}"> </form>
Then in browser /forgot-password Send Password Reset Link
/forgot-password
From mail go to link /reset-password/543c9a...hash?email=admin%40example.com
/reset-password/543c9a...hash?email=admin%40example.com
I get
ErrorException Undefined variable: request (View: ...\resources\views\admin\auth\reset-password.blade.php)`
It also doesn't work if I am using Jetstream and want to override the view forgot-password in JetstreamServiceProvider in boot() and sets any folder.
Jetstream
JetstreamServiceProvider
Even if I only specify this, I will not change anything else from a clean install (liveware).
Fortify::requestPasswordResetLinkView(static function () { return view('auth.forgot-password'); });
The text was updated successfully, but these errors were encountered:
Maybe this is not a wrong, and I didn't read something in the documentation or did I do it wrong?
Sorry, something went wrong.
Docs are missing this:
Fortify::resetPasswordView(function ($request) { return view('admin.auth.reset-password', ['request' => $request]); });
I'll send in a PR. Thanks.
No branches or pull requests
Description:
Undefined variable: request in
reset-password.blade.php
when I override viewforgot-password
Steps To Reproduce:
Clean installation Laravel Framework 8.4.0 without any auth scaffolding.
Db migration and seed - it's ok!
Then:
composer require laravel/fortify
and php artisan vendor:publish...
php artisan migrate
It's ok!
Created in
FortifyServiceProvider
inboot()
:And created views in
view/admin/auth
folder:forgot-password.blade.php
reset-password.blade.php
Then in browser
/forgot-password
Send Password Reset LinkFrom mail go to link
/reset-password/543c9a...hash?email=admin%40example.com
I get
It also doesn't work if I am using
Jetstream
and want to override the viewforgot-password
inJetstreamServiceProvider
inboot()
and sets any folder.Even if I only specify this, I will not change anything else from a clean install (liveware).
The text was updated successfully, but these errors were encountered: