Weird behavior in nested repeater relationship
I noticed a weird side effect while trying to create a nested relationship with repeaters.
When i add items to the relationship
I know the names are confusing but i'm still prototyping the entire thing, the idea is to create a series of preset of promos which then i can use inside the Post model in a select
When i add items to the relationship
promo everything works correctly but as soon as the form fills again after submit it only shows 1 element. Refreshing the page shows the correct number of elements.postpromopreset is defined as a HasMany relationship on the Post model postpromopreset_promo is defined as a HasMany relationship on the Postpromopreset model to a pivot model called PostpromopresetPromoI know the names are confusing but i'm still prototyping the entire thing, the idea is to create a series of preset of promos which then i can use inside the Post model in a select
Solution
Update: I found out the issue was caused by me extending from
Illuminate\Database\Eloquent\Relations\Pivot instead of Illuminate\Database\Eloquent\Model which caused this weird behavior