In this video we are going to learn about Forgot Password.
So let see how can we create Forgot Password.
On login page you can see here forgotten password link.
If I click on this link its opening a page which is forgot password.
Now in this lets implement here the html layout.
So switch to the project and lets open resources\\views\\auth\\forgot-password.blade.php file.
And here add the following code.

<x-base-layout>
<main id=\"main\" class=\"main-site left-sidebar\">

<div class=\"container\">

<div class=\"wrap-breadcrumb\">
<ul>
<li class=\"item-link\"><a href=\"/\" class=\"link\">home</a></li>
<li class=\"item-link\"><span>Forgot Password</span></li>
</ul>
</div>
<div class=\"row\">
<div class=\"col-lg-6 col-sm-6 col-md-6 col-xs-12 col-md-offset-3\">
<div class=\" main-content-area\">
<div class=\"wrap-login-item \">
<div class=\"login-form form-item form-stl\">
@if (session('status'))
<div class=\"mb-4 font-medium text-sm text-green-600\">
{{ session('status') }}
</div>
@endif
<x-jet-validation-errors class=\"mb-4\" />
<form name=\"frm-login\" method=\"POST\" action=\"{{route('password.email')}}\">
@csrf
<fieldset class=\"wrap-title\">
<h3 class=\"form-title\">Forgot Password</h3>
</fieldset>
<fieldset class=\"wrap-input\">
<label for=\"frm-login-uname\">Email Address:</label>
<input type=\"email\" id=\"frm-login-uname\" name=\"email\" placeholder=\"Type your email address\" :value=\"old('email')\" required autofocus>
</fieldset>
<input type=\"submit\" class=\"btn btn-submit\" value=\"Email Password Reset Link\" name=\"submit\">
</form>
</div>
</div>
</div><!--end main products area-->
</div>
</div><!--end row-->

</div><!--end container-->

</main>
</x-base-layout>


Now save this file and lets check it.
So switch to browser and refresh the page.
And here you can see the template applied on forgot password page.

Now for sending the password reset link we have to configure the email.
So for that lets configure the email.
Go to the .env file.
And here add the email details.
Here I am going to enter gmail credentials.

MAIL_MAILER=smtp.
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=yourgmailid@gmail.com
MAIL_PASSWORD=paswword
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=yourgmailid@gmail.com
MAIL_FROM_NAME=\"${APP_NAME}\"

Now save this
And re-run the application so switch to command prompt and
Press ctrl +c now run the command


php artisan serve


Now switch to browser and refresh the page.
Now enter here the email id for resetting the password.
So I am going to enter email id of user.
Now click on Email Password Reset Link.
After this you will get the message email sent.
Now lets check the email.
So open the gmail.
And here you can see the reset email.
So open this email.
And click on this link.
Now you can see here the page reset-password.
Now lets apply the template on this page.
So switch to the project and lets open this reset-password.blade.php file and here add the following code.

<x-base-layout>
<main id=\"main\" class=\"main-site left-sidebar\">

<div class=\"container\">

<div class=\"wrap-breadcrumb\">
<ul>
<li class=\"item-link\"><a href=\"/\" class=\"link\">home</a></li>
<li class=\"item-link\"><span>Reset Password</span></li>
</ul>
</div>
<div class=\"row\">
<div class=\"col-lg-6 col-sm-6 col-md-6 col-xs-12 col-md-offset-3\">
<div class=\" main-content-area\">
<div class=\"wrap-login-item \">
<div class=\"login-form form-item form-stl\">
<x-jet-validation-errors class=\"mb-4\" />
<form name=\"frm-login\" method=\"POST\" action=\"{{route('password.update')}}\">
@csrf
<input type=\"hidden\" name=\"token\" value=\"{{ $request->route('token') }}\">
<fieldset class=\"wrap-title\">
<h3 class=\"form-title\">Reset Password</h3>
</fieldset>
<fieldset class=\"wrap-input\">
<label for=\"frm-login-uname\">Email Address:</label>
<input type=\"email\" id=\"frm-login-uname\" name=\"email\" placeholder=\"Type your email address\" value=\"{{$request->email}}\" required autofocus>
</fieldset>
<fieldset class=\"wrap-input item-width-in-half left-item \">
<label for=\"password\">Password *</label>
<input type=\"password\" id=\"password\" name=\"password\" placeholder=\"Password\" required autocomplete=\"new-password\">
</fieldset>
<fieldset class=\"wrap-input item-width-in-half \">
<label for=\"password_confirmation\">Confirm Password *</label>
<input type=\"password\" id=\"password_confirmation\" name=\"password_confirmation\" placeholder=\"Confirm Password\" required autocomplete=\"new-password\">
</fieldset>
<input type=\"submit\" class=\"btn btn-submit\" value=\"Reset Password\" name=\"submit\">
</form>
</div>
</div>
</div><!--end main products area-->
</div>
</div><!--end row-->

</div><!--end container-->

</main>
</x-base-layout>


Now its done so lets check it.
Switch to the browser and refresh the page.
And you can see the template has been applied on reset password page.
Now enter here the new password and cofirm the new password.
Now click on reset password button.
And here you can see its redirected me on login it means password has been changed now lets login with new password.
So enter here the email id and password.
Now click on login you can user2 has been logged in.
So in this way you can create Forgot Password so that's all about Forgot Password.