samedi 26 mai 2018

Laravel 5.5: How to get top selling items of a given shop?

My tables are like:

shops [id]

inventories [id, shop_id]

orders [id, shop_id]

order_item [order_id, inventory_id, quantity]

Now I want 5 top selling inventories of a given shop, What will be the best possible way to do that?

I'm on Laravel 5.5



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire