This commit is contained in:
Andras Bacsai committed 2023-12-05 15:19:54 +01:00
1 parent e0cefc787a
commit d59ec2548a
3 files changed
+19 -12

No files matched your search

+3 -1
View File
@@ -13,14 +13,16 @@ use Illuminate\Queue\SerializesModels;
class TestEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $teamId;
public function __construct()
{
$this->teamId = auth()->user()->currentTeam()->id;
}
public function broadcastOn(): array
{
return [
new Channel('public'),
new PrivateChannel("custom.{$this->teamId}"),
];
}
}