X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=routes%2Fchannels.php;h=e93d25e9c284e4afa7c4c91876f6688e97133590;hb=5b21bf8a7e7efed35389c693fcf3775d6ee3f0ec;hp=4581feb7df93cf85c1b5501370046d7c1e6cc18a;hpb=4388278823ac8a791641ac1d65fc675e9543b8e8;p=alttp.git diff --git a/routes/channels.php b/routes/channels.php index 4581feb..e93d25e 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -22,6 +22,11 @@ Broadcast::channel('App.Control', function ($user) { return true; }); +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;