name = auth()->user()->name; $this->email = auth()->user()->email; $this->timezone = auth()->user()->timezone; } public function form(Form $form): Form { $rules = UpdateUserProfileInformation::rules(auth()->user()); return $form ->schema([ Section::make() ->heading('Profile Information') ->description('Update your account\'s profile information and email address.') ->schema([ TextInput::make('name') ->label('Name') ->rules($rules['name']), TextInput::make('email') ->label('Email') ->rules($rules['email']), Select::make('timezone') ->label('Timezone') ->searchable() ->options( collect(timezone_identifiers_list()) ->mapWithKeys(fn ($timezone) => [$timezone => $timezone]) ) ->rules($rules['timezone']), ]) ->footerActions([ Action::make('save') ->label('Save') ->action(fn () => $this->submit()), ]), ]); } public function submit(): void { $this->validate(); app(UpdateUserProfileInformation::class)->update(auth()->user(), $this->all()); Notification::make() ->success() ->title('Profile updated!') ->send(); } }