can('dcat.admin.profit.pay'); } public function confirm() { return '是否确认?'; } // 处理请求 public function handle(Request $request) { // 获取选中的ID数组 $keys = $this->getKey(); try { DB::beginTransaction(); DB::commit(); } catch (Throwable $th) { DB::rollBack(); report($th); return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); } return $this->response()->success('操作成功')->refresh(); } }