getKey(); if (empty($ids)) { return $this->response()->error('请选择要禁用的配置'); } // 批量更新 $count = $this->getModel()::whereIn('id', $ids)->update(['is_enabled' => 0]); return $this->response() ->success("成功禁用 {$count} 个配置") ->refresh(); } catch (\Exception $e) { return $this->response() ->error('批量禁用失败:' . $e->getMessage()); } } /** * 确认对话框 */ public function confirm() { return [ '确认批量禁用?', '此操作将禁用选中的所有清理配置。' ]; } }