From 463fc3cb89d1c5670fa2b646ebd02c020f0c523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 15 Mar 2023 12:15:11 +0300 Subject: [PATCH] fixed missing currency code get config issue ( #8669mnvqf ) --- app/Http/Controllers/Settings/Currencies.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Settings/Currencies.php b/app/Http/Controllers/Settings/Currencies.php index c99c30ba7..9abf7dfe8 100644 --- a/app/Http/Controllers/Settings/Currencies.php +++ b/app/Http/Controllers/Settings/Currencies.php @@ -232,13 +232,13 @@ class Currencies extends Controller $code = request('code'); - $currencies = Currency::all()->pluck('rate', 'code'); - if ($code) { + $currencies = Currency::all()->pluck('rate', 'code'); + $currency = config('money.' . $code); $currency['rate'] = isset($currencies[$code]) ? $currencies[$code] : null; - $currency['symbol_first'] = $currency['symbol_first'] ? 1 : 0; + $currency['symbol_first'] = ! empty($currency['symbol_first']) ? 1 : 0; $json = (object) $currency; }