mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-04 06:23:17 -05: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];
 | 
						|
});
 |