@php $audienceOptions = [ 'all' => ['label' => 'All active users', 'hint' => 'Every player whose account is not banned.'], 'selected_users' => ['label' => 'Selected users', 'hint' => 'Pick specific players by username.'], 'tournament_participants' => ['label' => 'Tournament participants', 'hint' => 'Players with a confirmed entry in one tournament.'], ]; $selectedTournament = $audienceType === 'tournament_participants' && $tournamentId ? $tournaments->firstWhere('id', (int) $tournamentId) : null; $selectedCount = $this->selectedUsers->count(); $audienceSummary = match ($audienceType) { 'all' => 'all active players', 'selected_users' => $selectedCount === 0 ? 'the players you select' : $selectedCount.' selected '.($selectedCount === 1 ? 'player' : 'players'), 'tournament_participants' => $selectedTournament ? 'the confirmed participants of "'.$selectedTournament->title.'"' : 'the participants of the tournament you choose', default => 'the chosen audience', }; @endphp
@if ($errors->any()) Check the highlighted fields below, then send again. @endif
Audience
@foreach ($audienceOptions as $value => $option) @endforeach
@error('audienceType') @enderror
@if ($audienceType === 'selected_users')
@if ($this->searchResults->isNotEmpty())
    @foreach ($this->searchResults as $user)
  • @endforeach
@endif @if ($this->selectedUsers->isNotEmpty())

Selected ({{ $selectedCount }})

    @foreach ($this->selectedUsers as $user)
  • {{ $user->username }}
  • @endforeach
@endif @error('selectedUserIds') @enderror
@endif @if ($audienceType === 'tournament_participants')
@foreach ($tournaments as $tournament) @endforeach
@endif
Mini Max now

$title !== '', 'text-fg-3' => $title === ''])>{{ $title !== '' ? $title : 'Notification title' }}

$body !== '', 'text-fg-3' => $body === ''])>{{ $body !== '' ? $body : 'Your message will appear here.' }}

This will be delivered to {{ $audienceSummary }}.

Notifications go out immediately and can't be recalled. Send notification Sending…