@php $topExchangesCoins = App\Models\Order::whereHas('coin', function ($q) { $q->active()->crypto(); })->where('status', '!=', Status::ORDER_CANCELED) ->selectRaw('*,SUM(filled_amount) as total_exchange_amount') ->groupBy('coin_id') ->orderBy('total_exchange_amount', 'desc') ->take(4) ->with('coin', 'coin.marketData') ->get(); @endphp
@lang('Top Exchanges Coin')
@forelse ($topExchangesCoins as $topExchangesCoin) @php $marketData = @$topExchangesCoin->coin->marketData; $htmlClass = $marketData->html_classes; @endphp
{{ @$topExchangesCoin->coin->symbol }} {{ showAmount($marketData->price, 8) }} {{ getAmount(@$marketData->percent_change_1h, 2) }}%
@empty

@lang('No coin found')

@endforelse