validate(User::$forgetrules); $status = Password::sendResetLink($cred); if ($status === Password::RESET_LINK_SENT) $this->dispatch('sent'); elseif ($status === Password::RESET_THROTTLED) $this->dispatch('error', message: "Tunggu sebentar sebelum mencoba lagi."); } catch (QueryException $e) { Log::error($e); $this->dispatch('error', message: "Terjadi kesalahan Database #{$e->errorInfo[1]}"); } catch (TransportException $e) { Log::error($e); $this->dispatch('error', message: "Email gagal dikirim"); } } public function render() { return view('livewire.forgot'); } }