|
|
@@ -198,16 +198,16 @@ class SiteController extends BaseController
|
|
|
$currenciesConversions = CurrencyConversions::getFromCache();
|
|
|
$currenciesConversions = array_column($currenciesConversions, NULL, 'TO_CURRENCY_ID');
|
|
|
|
|
|
-// foreach ($countries as &$country) {
|
|
|
-// $country['LOCAL_CURRENCY_NAME'] = $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '';
|
|
|
-// $country['CURRENCY_PRODUCT_RATE'] = $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
-// }
|
|
|
-
|
|
|
- $countries = array_map(fn($country) => [
|
|
|
- ...$country,
|
|
|
- 'LOCAL_CURRENCY_NAME' => $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '',
|
|
|
- 'CURRENCY_PRODUCT_RATE' => $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0,
|
|
|
- ], $countries);
|
|
|
+ foreach ($countries as &$country) {
|
|
|
+ $country['LOCAL_CURRENCY_NAME'] = $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '';
|
|
|
+ $country['CURRENCY_PRODUCT_RATE'] = $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
+ }
|
|
|
+
|
|
|
+// $countries = array_map(fn($country) => [
|
|
|
+// ...$country,
|
|
|
+// 'LOCAL_CURRENCY_NAME' => $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '',
|
|
|
+// 'CURRENCY_PRODUCT_RATE' => $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0,
|
|
|
+// ], $countries);
|
|
|
|
|
|
return static::notice(['data' => $countries]);
|
|
|
}
|