@php $topInvestor = \App\Models\Invest::with('user') ->selectRaw('SUM(amount) as totalAmount, user_id') ->orderBy('totalAmount', 'desc') ->groupBy('user_id') ->limit(8) ->get(); $top_investorContent = getContent('top_investor.content', true); @endphp

{{ __(@$top_investorContent->data_values->heading) }}

{{ __(@$top_investorContent->data_values->sub_heading) }}

@foreach ($topInvestor as $k => $data)
{{ ordinal($loop->iteration) }}
{{ @json_decode(json_encode($data->user->username)) }}

@lang('Total Invest') {{ showAmount($data->totalAmount) }}

@endforeach