lundi 25 avril 2016

Get record from relation - laravel eloquent

I have two tables

ProductAttribute

ID (PK) ProdID (FK) AttrName

Product

ID (PK) ProdName MerchantID(FK)

Now I want to fetch all attributes of specific products where merchant id = 5. Anyone help me to build query in laravel eloquent.

I created my self but it shows all attributes from all products with merchant, and shows null to product array where merchant id is not 5.

please help me to solve this out.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire