@extends('layouts.app') @section('title', $tournament->title) @section('show-header', true) @section('back-button', true) @section('page-title', 'Match Details') @section('content') {{-- Banner --}}
{{ $tournament->title }}
@if($tournament->status === 'upcoming') Upcoming @elseif($tournament->status === 'ongoing') 🔴 Live @elseif($tournament->status === 'result') Result @elseif($tournament->status === 'cancelled') Cancelled @endif {{ $tournament->match_type }}

{{ $tournament->title }}

{{-- Prize Pool Info --}}

Prize Distribution

৳{{ number_format($tournament->prize_1st) }}

🥇 1st Place

৳{{ number_format($tournament->prize_2nd) }}

🥈 2nd Place

৳{{ number_format($tournament->prize_3rd) }}

🥉 3rd Place

৳{{ number_format($tournament->per_kill_prize) }}

⚔️ Per Kill

Total Prize Pool ৳{{ number_format($tournament->total_prize) }}
{{-- Match Info --}}

Match Info

@if($tournament->map)
Map{{ $tournament->map }}
@endif @if($tournament->version)
Version{{ $tournament->version }}
@endif
Mode{{ $tournament->match_type }}
Entry Fee{{ $tournament->entry_fee > 0 ? '৳'.number_format($tournament->entry_fee) : 'Free' }}
Scheduled{{ $tournament->scheduled_at->format('d M Y, g:ia') }}
Players {{ $tournament->registered_players }}/{{ $tournament->max_players }}
{{-- Room ID & Password (only for joined users when ongoing) --}} @if($hasJoined && $tournament->status === 'ongoing' && $tournament->room_id)

🚀 Room Details

Room ID

{{ $tournament->room_id }}

Password

{{ $tournament->room_password ?: 'None' }}

@if($tournament->room_password) @endif
@endif {{-- My Registration Info --}} @if($hasJoined && $myRegistration)

Your Registration

Game UID: {{ $myRegistration->game_uid }}
Name: {{ $myRegistration->player_name }}
@if($tournament->status === 'result')
Kills: {{ $myRegistration->kills }}
Position: #{{ $myRegistration->position ?? '-' }}
Prize Won: ৳{{ number_format($myRegistration->prize_won, 2) }}
@endif
@endif {{-- Join Button --}} @if(!$hasJoined && $tournament->status === 'upcoming') @if(!$tournament->getIsFull())

Join Tournament

@csrf
@error('game_uid')

{{ $message }}

@enderror
@error('player_name')

{{ $message }}

@enderror
@error('join')

{{ $message }}

@enderror
Entry Fee {{ $tournament->entry_fee > 0 ? '৳'.number_format($tournament->entry_fee) : 'Free' }}
Your Balance ৳{{ number_format(auth()->user()->balance, 2) }}
@else

Tournament Full

No more slots available

@endif @elseif($hasJoined)

✅ You have joined this tournament

@endif {{-- Rules --}} @if($tournament->rules)

Rules & Regulations

{{ $tournament->rules }}
@endif {{-- Players List --}} @if($players->count())

{{ $tournament->status === 'result' ? 'Results' : 'Registered Players' }} ({{ $players->count() }})

@foreach($players as $i => $player)
@if($tournament->status === 'result' && $player->position) #{{ $player->position }} @else #{{ $i+1 }} @endif {{ $player->player_name }}
@if($tournament->status === 'result')
⚔️ {{ $player->kills }} kills @if($player->prize_won > 0) ৳{{ number_format($player->prize_won) }} @endif
@endif
@endforeach
@endif {{-- Description --}} @if($tournament->description)

About

{{ $tournament->description }}

@endif
@endsection @push('scripts') @endpush