lundi 30 mai 2016

Laravel 5.1 - Blade Count total quantity products

I have a session "Cart" with more one products, each product have more one quantity in my cart session. I would like show in my header menu the total quantity. How can i count and show total quantity with blade ? Or there a is better way?

My header menu show a list dropdown with all products in my session cart like this

principal.blade.php ( it work well)

 @foreach (session()->get('cart') as $item)
  
  
  
@endforeach 

I would like show the total quantity of all my products! thank you for your help!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire