Take a look here: https://laravel.com/docs/10.x/eloquent-relationships#has-many-through
Jul 31, 2023
3
Level 3
Link two models from two in between models
With the following structure :
____cars____
foos___/ \___bars
\___trucks___/
What should I add to my Foo model to the corresponding bar ?
Knowing that both foos and bars contain car_id and truck_id.
Please or to participate in this conversation.