demonshide
How to Edit the Data of a Repeater
I tested the methods
mutateRelationshipDataBeforeSaveUsing()
, mutateRelationshipDataBeforeFillUsing()
, and mutateRelationshipDataBeforeCreateUsing()
in the Filament demo. I tested them in App\Filament\Resources\Shop\OrderResource
. On line 357, I added:
And it always returns only the data from the first item of the repeater, like this:
Even though there are several items, it only returns 1, and it is always the first item of all.9 replies
How to Edit the Data of a Repeater
Thank you very much, I did this to test:
I added several records in the repeater, so I expected to see something like this:
But it only shows this:
Meaning, it only shows the first one and seems to ignore the rest.
I also tried altering it:
And what I achieved was that when editing, every record in the repeater gets set to those values.
9 replies
How to Edit the Data of a Repeater
I tried to analyze how the data from a repeater is sent, but I realized that when I click 'create', only the base model data is sent, and I don’t see the repeater data or that many-to-many relationship.
9 replies