I message event session

This commit is contained in:
a6a2f5842 2025-09-12 11:00:53 +02:00
parent ca1e1e4e29
commit ce5b705bea
1 changed files with 3 additions and 2 deletions

View File

@ -14,13 +14,14 @@ class WebsocketMessageEvent implements ShouldBroadcastNow
public function __construct(
public string $event,
public $data
public $data,
public ?string $session,
) {}
public function broadcastOn()
{
return [
new PrivateChannel('websocket'),
new PrivateChannel('websocket'.($this->session ? ".{$this->session}" : '')),
];
}