mardi 10 septembre 2019

Query about multiple relationships in Laravel

I make a query, when you have a pivot table with several related data from different tables, should it be a pivot model or do I directly create the independent relationships of each model? that is to say if I bring the data of a relationship and I want the name of users it will bring it to me and of the other relationships it will only show me the id, but if I want to consult another data of that table it will not recognize me, in that case would have to create a method to bring that data through its ID. If I create a pivot model it is not necessary. The question itself is to know which of the 2 is more efficient?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Lpha9d
via IFTTT

Aucun commentaire:

Enregistrer un commentaire