This is a frequent problem. It is known as a four table relation (3 + pivot).
I think the best solution is to add an id column to the pivot table and handle it as a model.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community