diff --git a/app/Http/Controllers/Admin/OtherController.php b/app/Http/Controllers/Admin/OtherController.php index 1545679..ef880f1 100755 --- a/app/Http/Controllers/Admin/OtherController.php +++ b/app/Http/Controllers/Admin/OtherController.php @@ -41,9 +41,9 @@ class OtherController extends CommonController public function home() { // 校友总数 - $schoolmate['schoolmate_total'] = User::where('is_schoolmate', 1)->groupBy('mobile')->count(); + $schoolmate['schoolmate_total'] = User::where('is_schoolmate', 1)->distinct('mobile')->count(); // 2025年校友数 - $schoolmate['schoolmate_year'] = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->groupBy('mobile')->count(); + $schoolmate['schoolmate_year'] = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->distinct('mobile')->count(); // 上市企业总市值 $company['company_market'] = Company::where('company_market', 1)->sum('market_value'); // 校友企业总融资额