This commit is contained in:
2025-05-27 15:19:44 +08:00
parent 70d0d39188
commit 86b7b0c608
3 changed files with 10 additions and 9 deletions
@@ -422,16 +422,17 @@ class VehicleController extends Crud
$translations = array_merge($required_translations, $translations);
}
// 如果是 POST 请求,处理数据保存和翻译
if ($request->method() === 'POST') {
$this->save($request);
}
$data = Vehicle::where('id', $id)->first();
if (!$data) {
return json(['code' => 1, 'msg' => $translations['data_not_found'] ?? '数据不存在']);
}
// 如果是 POST 请求,处理数据保存和翻译
if ($request->method() == 'POST') {
$this->save($request);
return json(['code' => 0, 'msg' => '保存成功']);
}
return view('vehicle/updateLogistics', [
'id' => $id,
'data' => $data,