Gabriel Henrique
SpatieMediaLibraryFileUpload inside a Repeater
Hello, I have a model pages, model pages have a json column that I call cf. Each page has a different form template, all form values are saved in json format in the cf column. So far ok, everything works wonderfully, creation, editing, etc.
I want to place a SpatieMediaLibraryFileUpload inside a repeater. I know that SpatieMediaLibraryFileUpload has multiple(), but I wanted some additional inputs for each image, so it is inside a repeater.
My difficulty is the combination of spatie media with repeater. It even saves cool, when opening the edit it takes only 1 of the images and places the same one in all the repetitions, ignoring the other images uploaded previously. This makes sense, since make("name") is the same in all of them.
I've been trying to make this work for 5 days, I've tried some types of mixin and some Closures but I'm already wanting to cry in the fetal position.
Does anyone have a smarter (or less stupid) idea?
One thing I thought might work is the solution from this link https://github.com/filamentphp/filament/pull/10795, but the whereCustomProperties function seems to have ceased to exist, I'm up to date and it doesn't exist
2 replies