Answers for "laravel count by date"

PHP
0

laravel count 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