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