roomId), ]; } /** * 方法功能:声明广播数据。 */ public function broadcastWith(): array { $quizTypeLabel = \App\Models\Riddle::labelForType($this->quizType); return [ 'round_id' => $this->roundId, 'quiz_type' => $this->quizType, 'quiz_type_label' => $quizTypeLabel, 'quiz_round_id' => $this->roundId, 'quiz_hint' => $this->hint, 'quiz_reward_gold' => $this->rewardGold, 'quiz_reward_exp' => $this->rewardExp, 'hint' => $this->hint, 'reward_gold' => $this->rewardGold, 'reward_exp' => $this->rewardExp, 'message' => "📣 【猜谜活动·{$quizTypeLabel}】第 #{$this->roundId} 题开始!题面:{$this->hint}", ]; } }