How to access a many-to-many relationship? #1386
Answered
by
lrljoe
kevinrueda
asked this question in
Q&A
-
I have two models Product and Branch, both have their relationship defined with belongsToMany and I follow the Laravel conventions where the pivot table is called branch_product and it contains an is_available field. How can I use all the product fields in the datatable and add the extra is_available? Thank you. Sorry for my English
|
Beta Was this translation helpful? Give feedback.
Answered by
lrljoe
Oct 5, 2023
Replies: 1 comment 11 replies
-
Hi @kevinrueda Three elements here:
Once that's resolved:
|
Beta Was this translation helpful? Give feedback.
11 replies
Answer selected by
kevinrueda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @kevinrueda
Three elements here:
Once that's resolved: