X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=routes%2Fchannels.php;h=b0a25526a12701f2f783d06a128c48433c7be02c;hb=1f91cd54bca46f686aaed871c9a7a7d000179ee0;hp=4581feb7df93cf85c1b5501370046d7c1e6cc18a;hpb=4388278823ac8a791641ac1d65fc675e9543b8e8;p=alttp.git diff --git a/routes/channels.php b/routes/channels.php index 4581feb..b0a2552 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,5 +1,6 @@ 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;