mardi 1 novembre 2016

Laravel Product tag Multiple table relationship

I have three Table

products

id | name | category_id | sub_category_id



product_tags

 id | tag_id| product_id 


tags

 id | name

Now I have only sub_category_id like 3.

now I want those tag names which exist in product_tags table and products category_id match with my category_id which come from sub_category_id like 3

I cant understand How to implement it.I am tying to use with,has,whereHas but nothing work



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

Aucun commentaire:

Enregistrer un commentaire