toUsername); } /** * 广播负载:包含发起人信息,供前端弹窗使用。 * * @return array */ public function broadcastWith(): array { return [ 'from_username' => $this->fromUsername, 'to_username' => $this->toUsername, 'type' => 'friend_removed', ]; } }