post(); $validate = new GoodsValidate(); if (!$validate->scene('add')->check($params)) { return json_fail($validate->getError()); } return GoodsService::insertRecharge($params); } public function update(Request $request): Response { $validate = new GoodsValidate(); if (!$validate->scene('update')->check($request->post())) { return json_fail($validate->getError()); } return GoodsService::updateRecharge($request->post()); } }