diff --git a/app/controller/admin/api/v1/DashboardController.php b/app/controller/admin/api/v1/DashboardController.php index bdaf680..32c4ae3 100644 --- a/app/controller/admin/api/v1/DashboardController.php +++ b/app/controller/admin/api/v1/DashboardController.php @@ -65,7 +65,7 @@ class DashboardController $login = User::whereBetween('login_time', [ $startOfDay, $endOfDay])->count(); $registration = User::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count(); $withdraw=Withdraw::whereBetween('createtime2', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count();; - $binding=UserPhone::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->groupBy('user_id')->count(); + $binding=UserPhone::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->distinct('user_id')->count('user_id'); $res['login']=$login; $res['registration']=$registration; $res['withdraw']=$withdraw;