<?php
 namespace App\Events; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class ChatSessionActivity implements ShouldBroadcastNow { use Dispatchable, InteractsWithSockets, SerializesModels; public function __construct(public int $sessionId) {} public function broadcastOn(): array { return [new PrivateChannel('admin.chat')]; } public function broadcastAs(): string { return 'ChatSessionActivity'; } public function broadcastWith(): array { return ['session_id' => $this->sessionId]; } } 