How use repeaters with MorphToMany relationship with pivot columns
I have this models: weekDay, Amenity, Braches and Mall, and a table morthtoMany schedules this table have the fields: week_day_id, opening_hour (time field), closing_hour (time field), schedulable_type (strign for the morph model), schedulable_id (callable id), I need to create a multi select, where I can pass the week_day_id,
4 Replies
When I created I can select multiple rows but only save de last row
anyone can help me
is start/end on the model for fillable?
Also... where is ->relationship('schedules') on the repeater
thanks for your answer, I was have two issues. in amenity model I was have schedules()->morphToMany, It change to shcedules->morphMany and in the repeater I needed ->relationship('schedules')