ask('选择ID:'); $service = new \App\Services\Pair\GroupService(); $pairs = PairModel::where('stage_id', 55) ->where('rematch', 1) ->where('group_id', '>', 0) ->whereNotNull('assoc_id') ->get(); foreach ($pairs as $pair) { $service->exitGroup($pair); } } }