FileUpload field inside relationship launch exception on edit

I have create a filament resource, the model has a "hasOne" relation to other model with a file_path field. In the parent form I set:
php
Group::make()->relationship('related')->schema([
FileUpload::make('file_path'),
TextInput::make('related_data'),
]);
php
Group::make()->relationship('related')->schema([
FileUpload::make('file_path'),
TextInput::make('related_data'),
]);
Then I can fill the related data and upload a file, but once I upload the file and it is saved to the model, the edit form lauchs a foreach() argument must be of type array|object, string given exception and can't use the FileUpload field. Someone can help me to resolve that? Thanks in advance
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?