Relation Manager with Pivot and ordering on pivot
I have a primary table, which then allows attaching items from the same table with a pivot table, i.e. primary and sub. For setions like, a/b/c. I am using a pivot table and all seems to work, except orderable since it's trying to do it against the primary table.
I can't see away around this, without actually having the pivot as a primary table and dropping pivot function, then on the pivot adding primary and sub relationships to map the ids to titles etc.
Ideas?
1 Reply
Add
->withPivot('order_column')
to your model's relation