|
|
|
|
@ -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) {
|
|
|
|
|
|