# Reset Password | Soft UI Dashboard Bootstrap @ Creative Tim
A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs.
Author: Creative Tim
Keywords: creative tim, updivision, html dashboard, laravel, html css dashboard laravel, soft ui dashboard laravel, laravel soft ui dashboard, soft ui admin, laravel dashboard, laravel admin, web dashboard, bootstrap 5 dashboard laravel, bootstrap 5, css3 dashboard, bootstrap 5 admin laravel, soft ui dashboard bootstrap 5 laravel, frontend, responsive bootstrap 5 dashboard, soft ui dashboard, soft ui laravel bootstrap 5 dashboard

# Reset Password

An email is sent to the user's address to help him reset his password.

The user can access the reset password page by clicking the button found in the email. The link for resetting the password is available for 12 hours and is unique for the user. The user must add the email, the password and confirm the password for his password to be updated.

The `App/Http/Controllers/ChangePasswordController.php` helps the user reset the password.

Copy

                    public function changePassword(Request $request)
                    {

                        $request->validate([
                            'token' => 'required',
                            'email' => 'required|email',
                            'password' => 'required|min:8|confirmed',
                        ]);

                        $status = Password::reset(
                            $request->only('email', 'password', 'password_confirmation', 'token'),
                            function ($user, $password) {
                                $user->forceFill([
                                    'password' => Hash::make($password)
                                ])->setRememberToken(Str::random(60));

                                $user->save();

                                event(new PasswordReset($user));
                            }
                        );

                        return $status === Password::PASSWORD_RESET
                                    ? redirect('/login')->with('status', __($status))
                                    : back()->withErrors(['email' => [__($status)]]);
                    }