Files
portal-api/routes/channels.php
T

38 lines
1.3 KiB
PHP

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