From 975662d79cde7068368d5bf4c047352d382768d3 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Wed, 30 Oct 2024 17:41:27 +0500 Subject: [PATCH] fix --- app/Nova/Actions/MakeSberPaymentAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Nova/Actions/MakeSberPaymentAction.php b/app/Nova/Actions/MakeSberPaymentAction.php index ca2775d..35feac6 100644 --- a/app/Nova/Actions/MakeSberPaymentAction.php +++ b/app/Nova/Actions/MakeSberPaymentAction.php @@ -64,8 +64,8 @@ class MakeSberPaymentAction extends Action public function fields(NovaRequest $request) { $usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value'); - $usd_to_rub = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'RUB')->first('value'); - $rub_to_tmt = CurrencyRate::where('currency_from', 'RUB')->where('currency_to', 'TMT')->first('value'); + $usd_to_rub = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'RUB')->first('value')?->value; + $rub_to_tmt = CurrencyRate::where('currency_from', 'RUB')->where('currency_to', 'TMT')->first('value')?->value; if (! $usd_to_tmt || ! $usd_to_rub || ! $rub_to_tmt) { return [];