I have two tables :
the first is category which have columns: id, name, parent_category_id the second is products which have columns: id, name, price, category_id
now each category may have other subcategories and each of the subcategories may also have subcategories so how using eloquent I can retrieve all products of the category and all of it is subcategories? would you please help me? thank you for your effort and time.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire