mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-29 20:51:09 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			448 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			448 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Illuminate\Support\Facades\Broadcast;
 | |
| use Laraspace\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];
 | |
| });
 |