master
cody 2 weeks ago
parent 2382a33ce1
commit 7f4d81b1d9

@ -174,6 +174,12 @@ class OtherController extends CommonController
$countryArea = Company::groupBy('company_city')->whereNotNull('company_city')->get(['company_city']);
$country = [];
foreach ($countryArea as $item) {
$total = User::whereHas('company', function ($query) use ($item) {
$query->where('company_city', $item->company_city);
})->where('is_schoolmate', 1)->count();
if (empty($total)) {
continue;
}
$country[] = [
'area' => $item->company_city,
'total' => User::whereHas('company', function ($query) use ($item) {

Loading…
Cancel
Save