复制'; /** * 处理请求 * * @param Request $request * @return mixed */ public function handle(Request $request) { try { $id = $this->getKey(); $repository = new GameRewardGroupRepository(); $newGroup = $repository->duplicate($id); return $this->response() ->success("已成功复制奖励组 [{$newGroup->name}]") ->refresh(); } catch (\Exception $e) { return $this->response() ->error('复制失败: ' . $e->getMessage()); } } /** * 确认信息 * * @return array|string|void */ public function confirm() { return ['确定要复制此奖励组吗?', '复制操作将创建一个新的奖励组记录,包括所有奖励项']; } }