#105 Make E-com in Laravel 5.6 / 5.7 | Forgot Password (I)
У вашего броузера проблема в совместимости с HTML5
In Part-105, we will start working on Forgot Password feature that we have left so far. Forgot Password functionality is for those users who forgets their password of their registered account in E-com website. We are going to create Forgot Password form in which user will enter his email to get new password in his registered email.
1) Update login_register.blade.php :-
First we will add "Forgot Password" link under login form at login_register.blade.php file that the user can click to recover his password.
2. Create Route :-
Create Get/POST Route for forgot-password in web.php file like below :-
// Forgot Password
Route::match(['get', 'post'],'/forgot-password','UsersController@forgot_password');
3. Create forgot_password function :-
Now create forgot_password function at UsersController that will return to forgot_password.blade.php file.
4. Create forgot_password.blade.php file :-
Now create forgot_password.blade.php file under views/users folder and create forgot password form with email field that user will fill to get his new password on his email.
You can copy content of login_register.blade.php file and replace login form with forgot password form as shown in video.
5) Update forgot_password function :-
Now update forgot_password function and in post method condition, check if email exists in users table and if email does not exists then return back the user to forgot password page with error message that "Email does not exists".
If email is correct then we will reset the password and email to user that we will do in next video.
Thanks for watching :)