|
|
|
@ -373,9 +373,11 @@ class CarInfoHandle |
|
|
|
|
if (count($phones) <= 6) { |
|
|
|
|
array_shift($phones); |
|
|
|
|
foreach (['id_phone', 'insured_phone', 'link_phone_1', 'link_phone_2', 'link_phone_3'] as $key) { |
|
|
|
|
if (!in_array($source_a[$key], $phones)) |
|
|
|
|
if (in_array($source_a[$key], $phones)) |
|
|
|
|
array_shift($phones); |
|
|
|
|
else |
|
|
|
|
$source_a[$key] = array_shift($phones); |
|
|
|
|
if (empty($source_a[$key])) |
|
|
|
|
if (empty($source_a[$key]) || empty($phones)) |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
CarInfoT::where('id', $source_a['id'])->update($source_a); |
|
|
|
|