Skip to content

Commit 20b9033

Browse files
Create channels.php
1 parent 6b8245a commit 20b9033

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

routes/channels.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Broadcast Channels
6+
|--------------------------------------------------------------------------
7+
|
8+
| Here you may register all of the event broadcasting channels that your
9+
| application supports. The given channel authorization callbacks are
10+
| used to check if an authenticated user can listen to the channel.
11+
|
12+
*/
13+
14+
Broadcast::channel('App.User.{id}', function ($user, $id) {
15+
return (int) $user->id === (int) $id;
16+
});

0 commit comments

Comments
 (0)