fixed missing currency code get config issue ( #8669mnvqf )

This commit is contained in:
Cüneyt Şentürk 2023-03-15 12:15:11 +03:00
parent 36ffeb3b4c
commit 463fc3cb89

View File

@ -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;
}