@if($user->createdChallenges->count() > 0 || $user->acceptedChallenges->count() > 0)
@foreach($user->createdChallenges->take(5) as $challenge)
Challenge #{{ $challenge->id }}
vs {{ $challenge->accepter ? $challenge->accepter->username : 'Open' }}
Created {{ $challenge->created_at->diffForHumans() }}
₦{{ number_format($challenge->wager_amount, 2) }}
{{ ucfirst($challenge->status) }}
@endforeach
@foreach($user->acceptedChallenges->take(5) as $challenge)
Challenge #{{ $challenge->id }}
vs {{ $challenge->creator->username }} (Accepted)
Accepted {{ $challenge->updated_at->diffForHumans() }}
₦{{ number_format($challenge->wager_amount, 2) }}
{{ ucfirst($challenge->status) }}
@endforeach
@else
No challenges found for this user.
@endif
@if($user->walletTransactions->count() > 0)
@foreach($user->walletTransactions->take(10) as $transaction)
{{ ucfirst($transaction->type) }}
{{ $transaction->description }}
{{ $transaction->created_at->format('M d, Y H:i') }}
{{ $transaction->amount > 0 ? '+' : '' }}₦{{ number_format($transaction->amount, 2) }}
{{ ucfirst($transaction->status) }}
@endforeach
@else
No transactions found for this user.
@endif
@if($user->badges->count() > 0)
@foreach($user->badges as $badge)
{{ $badge->icon }}
{{ $badge->name }}
{{ $badge->description }}
Earned {{ $badge->pivot->created_at->diffForHumans() }}
@endforeach
@else
@endif