*/ public function broadcastOn(): array { return [ new PresenceChannel('room.'.$this->roomId), ]; } /** * 广播数据 * * @return array */ public function broadcastWith(): array { return [ 'type' => $this->type, 'target_username' => $this->targetUsername, 'position_icon' => $this->positionIcon, 'position_name' => $this->positionName, 'department_name' => $this->departmentName, 'operator_name' => $this->operatorName, ]; } }