Files
portal-api/routes/channels.php
T
2025-07-24 16:18:27 +07:00

31 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Broadcast;
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all 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.Models.User.{id}', function ($user, $id) {
// return (int)$user->id === (int)$id;
//});
Broadcast::channel('Payment-Success.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => 'users']);
Broadcast::channel('Expiry-Time.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => 'users']);
Broadcast::channel('Created.Success.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => 'users']);
Broadcast::channel('Panel.Status.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => 'users']);