validate(); $user = Auth::user(); if (! Hash::check($this->password, $user->password)) { throw ValidationException::withMessages([ 'password' => __('auth.password'), ]); } Auth::logout(); $user->delete(); session()->invalidate(); session()->regenerateToken(); $this->redirect('/', navigate: false); } public static function modalMaxWidth(): string { return 'sm'; } public function render(): View { return view('livewire.modals.delete-account'); } }