Answers for "laravel count group by date"

PHP
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

Browse Popular Code Answers by Language