mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
17 lines
445 B
PHP
17 lines
445 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Broadcast;
|
|
use Crater\User;
|
|
|
|
Broadcast::channel('conversation.{cid}', function ($user,$cid) {
|
|
return true; //(int) $user->conversation_id === (int) $cid
|
|
});
|
|
|
|
Broadcast::channel('user.{uid}', function () {
|
|
return true; //(int) $user->conversation_id === (int) $cid
|
|
});
|
|
|
|
Broadcast::channel('company.{companyId}', function ($user, $companyId) {
|
|
return ['id' => $user->id, 'name' => $user->name];
|
|
});
|