0
I’m trying to model with Laravel a database for purchases, in my mysql relations are like this, so I modeled on Laravel, for the associative table "vendor_detail_item" I used "belongstoMany" relation, it worked using Tinker.
Now comes the problem:
together with the details (supplier’s detail) and the items I would like to be able to access the other tables related to "supplier’s detail" which are "supplier" and "formapagto".
And I would also like to link this associative table "supplier".
I created a template for "vendor_detail_item", but I don’t know exactly how to do this.
I didn’t get to encode anything, I’m just trying to model the same thing on the Laravel.
If you have any suggestions about the MER accepted as well.
Thank you
I think it is the case that you create the model of the "pivot table".
– Wallace Maxters
using the pivot model I can define relation "belongsToMany" with another table? ai I write this relation in the pivot and in the other table? and to refer to more models I have to use the "has-Many-through"?
– Julia Zuin