Handle HasMany relationship with extra field.
andrei1820 opened this issue · 2 comments
andrei1820 commented
ben221199 commented
Handle the pivot table as a new object, with 2 belongs-to relations.
lindyhopchris commented
Yep that would be the solution. Don't think of it is a pivot, think of it as an intermediary resource. I.e. JSON:API works in resources so you need to represent the pivot table as a resource in your API, with relationships between it and the two related resources on either "side" of the pivot.