← {{ $group->name }}

İstatistikler

{{-- Gol krallığı --}}

👑 Gol Krallığı

@if ($topScorers->isEmpty())

Henüz gol kaydı yok — maç sonucu girerken golleri atanları da işaretle.

@else
@foreach ($topScorers as $i => $s) @endforeach
OYUNCU GOL MAÇ GOL/MAÇ
{{ $i === 0 ? '👑' : ($i + 1).'.' }} {{ $s['player']->name }} {{ $s['goals'] }} {{ $s['played'] }} {{ $s['played'] > 0 ? number_format($s['goals'] / $s['played'], 1) : '–' }}
@endif
{{-- Oyuncu istatistikleri --}}

Oyuncu İstatistikleri

@if ($playerStats->isEmpty())

Henüz istatistik yok — ilk maç sonucu kaydedildiğinde burası dolacak.

@else
@foreach ($playerStats as $s) @endforeach
OYUNCU MAÇ G B M KAZANMA
{{ $s['player']->name }} {{ $s['played'] }} {{ $s['win'] }} {{ $s['draw'] }} {{ $s['loss'] }} {{ $s['goals'] ?: '–' }} {{ $s['mvp'] ?: '–' }} %{{ $s['played'] > 0 ? round($s['win'] / $s['played'] * 100) : 0 }}
@endif
{{-- Maç geçmişi --}}

Maç Geçmişi {{ $matches->count() }} MAÇ

@if ($matches->isEmpty())

Kayıtlı maç yok. Maç sayfasında takımları kurup maç sonrası skoru kaydet.

@endif
@foreach ($matches as $match) @php $teamNames = fn ($team) => $match->rsvps ->filter(fn ($r) => $r->team === $team) ->map(fn ($r) => $r->player?->name) ->filter() ->implode(', '); $goalText = $match->goals ->sortByDesc('count') ->map(fn ($g) => $g->player?->name.($g->count > 1 ? ' ×'.$g->count : '')) ->filter() ->implode(', '); $mvpCounts = $match->mvpVotes->countBy('player_id'); $mvpName = null; if (! $match->mvpOpen() && $mvpCounts->isNotEmpty()) { $topId = $mvpCounts->sortDesc()->keys()->first(); $mvpName = $match->mvpVotes->firstWhere('player_id', $topId)?->player?->name; } @endphp
{{ $match->starts_at->translatedFormat('d F Y, l') }}
{{ $match->team_a_score }} : {{ $match->team_b_score }} @if ($teamNames('A'))Turuncu: {{ $teamNames('A') }}
@endif @if ($teamNames('B'))Yeşil: {{ $teamNames('B') }}@endif
@if ($goalText || $mvpName)
@if ($goalText)⚽ {{ $goalText }}@endif @if ($goalText && $mvpName)  ·  @endif @if ($mvpName)⭐ Maçın adamı: {{ $mvpName }}@endif
@endif
@endforeach