mercredi 7 novembre 2018

How to count table column categoryname in Laravel 5.6?

working with Laravel 5.6 and mysql. I have following table name as vehicles

id  name  number   type  
1   def   123      Car
2   lki   589      Van
3   loi   256      Truck
4   oiu   569      Car
5   hyy   589      Van

Now I need count number of each type columns values I do not wanna loop count. just I need count each Type and show on blade file. like this,

Car 2
Van 2
Truck 1

etc.. how can do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire