<?php

use App\Models\Player;
use Illuminate\Support\Facades\Broadcast;

Broadcast::channel(
    'player.{playerId}',
    static fn (Player $player, string $playerId): bool => ctype_digit($playerId)
        && (string) $player->getKey() === $playerId,
);
