]> git.localhorst.tv Git - alttp.git/blobdiff - routes/channels.php
listen to round updates
[alttp.git] / routes / channels.php
index 4302bb7d72871176f7d244756cdc14ca64197566..4581feb7df93cf85c1b5501370046d7c1e6cc18a 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use App\Models\Tournament;
 use Illuminate\Support\Facades\Broadcast;
 
 /*
@@ -20,3 +21,8 @@ Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
 Broadcast::channel('App.Control', function ($user) {
        return true;
 });
+
+Broadcast::channel('Tournament.{id}', function ($user, $id) {
+       $tournament = Tournament::findOrFail($id);
+       return true;
+});