Skip to content

Commit cb01eac

Browse files
Merge pull request #75 from gpibarra/model-should-be-strict
[Bug} compatibily with Model::shouldBeStrict()
2 parents 1754802 + f272f1e commit cb01eac

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Livewire/EditProfileForm.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ public function mount(): void
2828

2929
$this->userClass = get_class($this->user);
3030

31-
$this->form->fill($this->user->only(config('filament-edit-profile.avatar_column', 'avatar_url'), 'name', 'email'));
31+
$fields = [
32+
'name',
33+
'email',
34+
];
35+
if (filament('filament-edit-profile')->getShouldShowAvatarForm()) {
36+
$fields[] = config('filament-edit-profile.avatar_column', 'avatar_url');
37+
}
38+
39+
$this->form->fill($this->user->only($fields));
3240
}
3341

3442
public function form(Form $form): Form

0 commit comments

Comments
 (0)