|
|
|
@ -214,14 +214,14 @@ class AdminImport extends BaseService |
|
|
|
|
list($province, $city) = explode(".", $value); |
|
|
|
|
$cityNames[] = $city; |
|
|
|
|
} |
|
|
|
|
$regions = Region::whereIn('name', $cityNames)->select()->toArray(); |
|
|
|
|
$regions = Region::withoutGlobalScope()->whereIn('name', $cityNames)->select()->toArray(); |
|
|
|
|
$regionsnew = []; |
|
|
|
|
foreach ($regions as $key => $value) { |
|
|
|
|
$regionsnew[$value['pid']][] = $value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
foreach ($regionsnew as $pid => $value) { |
|
|
|
|
$privince = Region::where('id', $pid)->find(); |
|
|
|
|
$privince = Region::withoutGlobalScope()->where('id', $pid)->find(); |
|
|
|
|
$region_text[$pid]['name'] = $privince['name'] ?? ""; |
|
|
|
|
$citys = []; |
|
|
|
|
|
|
|
|
|