Files
portal-api/routes/channels.php
baodev0 520f21cb11 feat: add GeneratesUniqueSlug class for unique slug generation
feat: create PostCategoryFactory for generating post category data

feat: create PostFactory for generating post data

feat: add retry_requested_at column to services table

feat: add vcenter provisioning fields to products table

feat: add module_host_id to os table

feat: create email_notification_templates table for email templates

feat: add scenario and format fields to template table

feat: add admin fields to transactions table

fix: update ticket table columns and types

feat: add uuid to ticket table and backfill existing records

fix: make ticket_reply user_id nullable

feat: create notifications table for user notifications

fix: make ticket uuid nullable

feat: create post_categories table for blog categories

feat: create posts table for blog posts

feat: add invoice email template for PDF generation
2026-05-25 15:39:42 +07:00

51 lines
1.5 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' => ['client']]);
Broadcast::channel('Expiry-Time.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => ['client']]);
Broadcast::channel('Created.Success.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => ['client']]);
Broadcast::channel('Panel.Status.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
}, ['guards' => ['client']]);
Broadcast::channel('user.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
}, ['guards' => ['client']]);
// Admin notifications channel (public — all authenticated admins)
Broadcast::channel('admin-notifications', function () {
return true;
}, ['guards' => ['admin', 'admins-api']]);
Broadcast::channel('ticket.{ticketNum}', function () {
return true;
});
Broadcast::channel('notifications.client.{id}', function () {
return true;
});