X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=routes%2Fchannels.php;h=b0a25526a12701f2f783d06a128c48433c7be02c;hb=HEAD;hp=4302bb7d72871176f7d244756cdc14ca64197566;hpb=2efd7613561696a3abb19ee9f42b15cf9b4058ad;p=alttp.git diff --git a/routes/channels.php b/routes/channels.php index 4302bb7..b0a2552 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,5 +1,7 @@ can('editRestream', $channel); +}); + +Broadcast::channel('Protocol.{id}', function ($user, $id) { + $tournament = Tournament::findOrFail($id); + return $user->can('viewProtocol', $tournament); +}); + +Broadcast::channel('Tournament.{id}', function ($user, $id) { + $tournament = Tournament::findOrFail($id); + return true; +});