name = Auth::user()->name; $this->email = Auth::user()->email; } /** * Update the profile information for the currently authenticated user. */ public function updateProfileInformation(): void { $user = Auth::user(); $validated = $this->validate($this->profileRules($user->id)); $user->fill($validated); if ($user->isDirty('email')) { $user->email_verified_at = null; } $user->save(); $this->toast()->success(__('Profile updated.'))->send(); } /** * Send an email verification notification to the current user. */ public function resendVerificationNotification(): void { $user = Auth::user(); if ($user->hasVerifiedEmail()) { $this->redirectIntended(default: route('dashboard', absolute: false)); return; } $user->sendEmailVerificationNotification(); $this->toast()->info(__('A new verification link has been sent to your email address.'))->send(); } #[Computed] public function hasUnverifiedEmail(): bool { $user = Auth::user(); return $user instanceof MustVerifyEmail && ! $user->hasVerifiedEmail(); } #[Computed] public function showDeleteUser(): bool { $user = Auth::user(); return ! $user instanceof MustVerifyEmail || $user->hasVerifiedEmail(); } }