Closed damirqa closed 10 months ago
The group installation works differently. You specify to which group the field belongs, for example:
Upload::make('attachment')->groups('photos')
// ... Other fields
Upload::make('attachment')->groups('video')
Upon file upload, it is assigned a group. The values are also filtered based on this group for display. There is no need to save each group separately; it is sufficient to use:
$model->attachment()->syncWithoutDetaching($request->get('attachment'), []);
При загрузке файла при помощи Upload, не сохраняется group.
When uploading a file using Upload, the group is not being saved.
In the
save
method of theScreen
class, save the file as follows:query
method of theScreen
class, I try to retrieve files by group name, but I receive an empty collection:$informationPatients->attachment('images')->get()
I expected to get a collection by group name. The
group
field in theattachments
table is empty. I also have some additional questions. How can I pass attachments in Upload?$request->get('attachment', [])
.Desktop (please complete the following information):
Server (please complete the following information):