RossUK

Laravel Eloquent groupBy() and get count of each group

Posted 10 months ago by RossUK

if I have a table containing a job and a job can have a status of one of three values. What is the Laravel/Eloquent way of getting a count of each status?

I can do with separate count queries but not sure how to group-by and count with Eloquent.

Please sign in or create an account to participate in this conversation.