@extends('layouts.app') @section('title', 'My Tournaments') @section('content')

🏆 My Tournaments

@if(auth()->user()->canHostFreeTournaments()) Host New Tournament @endif
📊 All Tournaments 🔥 Ongoing 📚 Past Tournaments
Clear Filters
@if($tournaments->count() > 0)
@foreach($tournaments as $tournament)
{{ $tournament->game->name }}

{{ $tournament->title }}

{{ $tournament->game->name }}
@if($tournament->entry_fee > 0) ₦{{ number_format($tournament->entry_fee) }} @else FREE @endif
{{ ucfirst($tournament->status) }}
Host: {{ $tournament->host->username }} @if($tournament->host_id === auth()->id()) (You) @endif
Participants: {{ $tournament->participants->count() }}
@if($tournament->prize_pool > 0)
Prize Pool: ₦{{ number_format($tournament->prize_pool) }}
@endif @if($tournament->starts_at)
@if($tournament->status === 'upcoming') Starts: @elseif($tournament->status === 'ongoing') Started: @else Started: @endif {{ $tournament->starts_at->format('M j, Y g:i A') }}
@endif
{{ ucfirst($tournament->type) }} Tournament @if($tournament->host_id === auth()->id()) Host @else Participant @endif
{{ $tournament->created_at->diffForHumans() }}
@endforeach
{{ $tournaments->appends(request()->query())->links() }}
@else
🏆

@if(($filter ?? 'all') === 'ongoing') No Ongoing Tournaments @elseif(($filter ?? 'all') === 'past') No Past Tournaments @else No Tournaments Yet @endif

@if(($filter ?? 'all') === 'ongoing') You don't have any ongoing tournaments at the moment. @elseif(($filter ?? 'all') === 'past') You haven't participated in any completed tournaments yet. @else You haven't participated in any tournaments yet. @endif

@if(auth()->user()->canHostFreeTournaments()) Host Your First Tournament @else Browse Tournaments @endif
@endif
@endsection