# Forgot Password

If an existing user forgot his password he has the possibility of resetting his password.

To reset the password the user should click on the `here` button under the login form or add `/forgot-password` in the url.

The `App\Http\Livewire\Auth\ForgotPassword` takes care of sending an email to the user where he can reset the password afterwards.

                    public function recoverPassword() {
                        $this->validate();
                        $user = User::where('email', $this->email)->first();
                        if($user){
                            $this->notify(new ResetPassword($user->id));
                            $this->showSuccesNotification = true;
                            $this->showFailureNotification = false;
                        } else {
                            $this->showFailureNotification = true;
                        }
                    }