mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 05:31:24 +00:00
Setup pint & run code style fix
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Models\CompanySetting;
|
||||
use InvoiceShelf\Models\Currency;
|
||||
use InvoiceShelf\Models\ExchangeRateLog;
|
||||
use InvoiceShelf\Models\ExchangeRateProvider;
|
||||
use InvoiceShelf\Traits\ExchangeRateProvidersTrait;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class GetExchangeRateController extends Controller
|
||||
{
|
||||
@@ -18,7 +18,6 @@ class GetExchangeRateController extends Controller
|
||||
/**
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function __invoke(Request $request, Currency $currency)
|
||||
@@ -27,14 +26,14 @@ class GetExchangeRateController extends Controller
|
||||
$baseCurrency = Currency::findOrFail($settings['currency']);
|
||||
|
||||
$query = ExchangeRateProvider::whereJsonContains('currencies', $currency->code)
|
||||
->where('active', true)
|
||||
->get()
|
||||
->toArray();
|
||||
->where('active', true)
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
$exchange_rate = ExchangeRateLog::where('base_currency_id', $currency->id)
|
||||
->where('currency_id', $baseCurrency->id)
|
||||
->orderBy('created_at', 'desc')
|
||||
->value('exchange_rate');
|
||||
->where('currency_id', $baseCurrency->id)
|
||||
->orderBy('created_at', 'desc')
|
||||
->value('exchange_rate');
|
||||
|
||||
if ($query) {
|
||||
$filter = Arr::only($query[0], ['key', 'driver', 'driver_config']);
|
||||
|
||||
Reference in New Issue
Block a user