In certain part of my application written in Laravel I have this query:
$counts = User::select(\DB::raw('count(*) as status_count, status'))
->groupBy('status')
->get();
It returns me at least 1 record and at most 3, these are just the existing status. How do I return an extra line containing the total of records?