samedi 22 septembre 2018

How to print table column values counts in the welcome.blade.php

I am working with Larvel 5.6 and I have table name as projects with following columns

id    projectName          type
1    abc             finance
2   sxc             marckting
3   dgt             IT
4   hng             finance
5   hng             IT
6   gtf             finance       
etc

now I need count numbers of each type of the project table and print it on welcome.blade.php file like this

finance(3)    marckting(1)   IT(2)  etc

how can do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire