Replies: 1 comment 5 replies
-
Set the pivot columns in your model And then this can be made: .preload('yourRelationship', (query) => {
query.pivotColumns(['yourPivotColumn'])
}) The pivot columns values will be in |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone.
Is it possible to get the data related with a pivot table in a Many to Many relationship?
For example:
I have a car model related by many to many relationship with categories.
Some of these cars of some of these categories, (so the union of the both), have specifcs characteristics, today I'm using other table related with the pivot table of the first many to many relationship. Is it possible to get the data from the relation with the pivot table? Today I can get only values by the pivotColumns configuration, but I need to get the relationship and not only static values.
Beta Was this translation helpful? Give feedback.
All reactions