where('status', 'pending') ->where('ceremony_type', 'scheduled') ->where('ceremony_at', '<=', now()) ->with('marriage') ->cursor() ->each(function (WeddingCeremony $ceremony) use ($wedding) { if (! $ceremony->marriage) { return; } $result = $wedding->trigger($ceremony); if ($result['ok']) { // 广播全房间婚礼庆典 broadcast(new WeddingCelebration($ceremony, $ceremony->marriage)); } }); } }