Answers for "how to count group by results in laravel"

PHP
1

groupby in laravel with count

$user_info = Usermeta::groupBy('browser')->select('browser', DB::raw('count(*) as total'))->get();
Posted by: Guest on March-19-2021
0

laravel count group by date

$usersData = User::select(DB::raw('DATE(created_at) as date'), DB::raw('count(*) as total'))
            ->groupBy('date')
            ->orderBy('date', 'desc')
            ->take(7)
            ->get();
Posted by: Guest on July-07-2021

Code answers related to "how to count group by results in laravel"

Browse Popular Code Answers by Language