name = (string) ($user?->name ?? ''); $this->email = (string) ($user?->email ?? ''); $this->isOpen = true; } public function closeModal(): void { $this->isOpen = false; } public function save(): void { $user = Auth::user(); $this->validate([ 'name' => ['required', 'string', 'min:2', 'max:60'], ]); $user->forceFill([ 'name' => $this->name, ])->save(); $this->dispatch('toastMagic', status: 'success', title: 'Profile updated', message: 'Your profile has been saved.' ); $this->isOpen = false; } }; ?>
Update your display name.