@extends('layouts.app') @section('title', 'Invite Players - ' . $tournament->title) @section('content')
← Back to Tournament

Invite Players

{{ $tournament->title }}

{{ $tournament->participants->count() }}
Current Participants
{{ $tournament->pendingInvites->count() }}
Pending Invites
{{ $tournament->getMaxParticipants() }}
Max Participants
{{ $tournament->getMaxParticipants() - $tournament->participants->count() - $tournament->pendingInvites->count() }}
Spots Available
@if($tournament->hasParticipantLimit())
⚠️ Tournament has reached the maximum participant limit.
@endif @if(!$tournament->hasParticipantLimit() && $availableUsers->count() > 0)

Send Invitations

@csrf
@foreach($availableUsers as $user) @endforeach
Cancel
@elseif($availableUsers->count() === 0)
👥

No Available Users

All eligible users have already been invited or are participating in the tournament.

@endif @if($tournament->pendingInvites->count() > 0)

Pending Invitations

@foreach($tournament->pendingInvites as $invite)
{{ $invite->invitee->username }}
Invited {{ $invite->created_at->diffForHumans() }} @if($invite->expires_at) • Expires {{ $invite->expires_at->diffForHumans() }} @endif
@if($invite->message)
"{{ $invite->message }}"
@endif
⏳ Pending
Level {{ $invite->invitee->level }}
@endforeach
@endif
@push('scripts') @endpush @endsection