The most active and highest earning users
@php
$top3 = $topUsers->take(3);
$rest = $topUsers->slice(3);
$first = $top3->get(0);
$second = $top3->get(1);
$third = $top3->get(2);
@endphp
@if($topUsers->count() > 0)
@if($second)
@endif
@if($first)
@endif
@if($third)
@endif
@endif
🥈
@if($second->photo_url)
@else
{{ strtoupper(substr($second->first_name ?? 'U', 0, 1)) }}
@endif
{{ $second->first_name }}
🪙 {{ number_format($second->balance, 0) }}
👑
@if($first->photo_url)
@else
{{ strtoupper(substr($first->first_name ?? 'U', 0, 1)) }}
@endif
{{ $first->first_name }}
🪙 {{ number_format($first->balance, 0) }}
🥉
@if($third->photo_url)
@else
{{ strtoupper(substr($third->first_name ?? 'U', 0, 1)) }}
@endif
{{ $third->first_name }}
🪙 {{ number_format($third->balance, 0) }}
@foreach($rest as $index => $user)
@endforeach
{{ $index + 4 }}
@if($user->photo_url)
@else
{{ strtoupper(substr($user->first_name ?? 'U', 0, 1)) }}
@endif
{{ $user->first_name }}
🪙
{{ number_format($user->balance, 0) }}