{{ $player->username }} @php $elo = $player->elo ?? 1200; $div = getDivision($elo); $total = ($player->wins + $player->losses + $player->draws) ?: 1; $wr = round($player->wins / $total * 100, 1); $isMe = auth()->check() && auth()->id() === $player->id; @endphp
{{ $div['icon'] }}
{{ $player->username }}
{{ $div['name'] }} Bergabung {{ $player->created_at->format('M Y') }}
@foreach([['ELO',number_format($elo),'#60a5fa'],['W',$player->wins,'#4ade80'],['L',$player->losses,'#f87171'],['WR',$wr.'%','#facc15']] as [$l,$v,$c])
{{ $v }}
{{ $l }}
@endforeach
@if($isMe) Edit @endif
Riwayat Match
@forelse($matches as $match) @php $isHost = $match->host_id === $player->id; $myScore = $isHost ? $match->score_host : $match->score_guest; $opScore = $isHost ? $match->score_guest : $match->score_host; $opUser = $isHost ? $match->guest : $match->host; $won = $match->winner_id === $player->id; $draw = is_null($match->winner_id) && $match->status === 'completed'; $ec = $isHost ? ($match->elo_change_host ?? 0) : ($match->elo_change_guest ?? 0); @endphp
{{ $draw ? 'D' : ($won ? 'W' : 'L') }}
vs {{ $opUser?->username ?? 'Unknown' }}
{{ $match->created_at->diffForHumans() }}
{{ $myScore }} – {{ $opScore }}
@if($ec != 0)
{{ $ec > 0 ? '+' : '' }}{{ $ec }}
@endif
@empty
Belum ada pertandingan
@endforelse
@if($matches->hasPages())
{{ $matches->links() }}
@endif
Statistik
@foreach([ ['Gol Dicetak', $player->goals_scored ?? 0], ['Gol Kemasukan', $player->goals_conceded ?? 0], ['Clean Sheet', $player->clean_sheets ?? 0], ['Wins Streak Terpanjang', ($player->longest_win_streak ?? 0).'W'], ['Lose Streak Terpanjang', ($player->longest_lose_streak ?? 0).'L'], ['Total Match', $total], ['Draws', $player->draws ?? 0], ] as [$l,$v])
{{ $l }} {{ $v }}
@endforeach
Discord
{{ $player->discord_username ?? $player->username }}