2021-07-30 18:38:43 +02:00
|
|
|
<?php
|
|
|
|
|
2023-05-07 17:02:00 +02:00
|
|
|
use App\Models\User;
|
2021-07-30 18:38:43 +02:00
|
|
|
use Illuminate\Support\Facades\Broadcast;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Broadcast Channels
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2023-05-07 17:02:00 +02:00
|
|
|
| Here you may register all the event broadcasting channels that your
|
2021-07-30 18:38:43 +02:00
|
|
|
| application supports. The given channel authorization callbacks are
|
|
|
|
| used to check if an authenticated user can listen to the channel.
|
|
|
|
*/
|
|
|
|
|
2023-05-07 17:02:00 +02:00
|
|
|
Broadcast::channel('App.Models.User.{id}', static function (User $user, string|int $id) {
|
|
|
|
return $user->id === (int) $id;
|
2021-07-30 18:38:43 +02:00
|
|
|
});
|