summaryrefslogtreecommitdiff
path: root/routes/channels.php
diff options
context:
space:
mode:
authorMax2019-05-13 15:50:36 +0200
committerMax2019-05-13 15:50:36 +0200
commit7149647b729b2aa30d76346a7cc3da37c1c692ca (patch)
treeb773b7c02a3434ea46d12659302abc586b0fdb7b /routes/channels.php
downloadkategorischeraperitif-7149647b729b2aa30d76346a7cc3da37c1c692ca.tar.gz
Initial commit.
Diffstat (limited to 'routes/channels.php')
-rw-r--r--routes/channels.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/routes/channels.php b/routes/channels.php
new file mode 100644
index 0000000..f16a20b
--- /dev/null
+++ b/routes/channels.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Broadcast Channels
+|--------------------------------------------------------------------------
+|
+| Here you may register all of the event broadcasting channels that your
+| application supports. The given channel authorization callbacks are
+| used to check if an authenticated user can listen to the channel.
+|
+*/
+
+Broadcast::channel('App.User.{id}', function ($user, $id) {
+ return (int) $user->id === (int) $id;
+});