dev
parent
97369445de
commit
069ecb1e44
|
|
@ -44,7 +44,7 @@ class CropController extends Controller
|
||||||
|
|
||||||
$input = $request->input();
|
$input = $request->input();
|
||||||
if ($input['is_end'] != $crop->is_end) {
|
if ($input['is_end'] != $crop->is_end) {
|
||||||
if ($crop->is_end || Crop::where(['parent_id', $crop->id])->exists()) {
|
if ($crop->is_end || Crop::where(['parent_id' => $crop->id])->exists()) {
|
||||||
return $this->error('无法修改结点状态');
|
return $this->error('无法修改结点状态');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -55,7 +55,7 @@ class CropController extends Controller
|
||||||
$input['path'] = ($parent?->path ?? '').$parent?->id.'-';
|
$input['path'] = ($parent?->path ?? '').$parent?->id.'-';
|
||||||
}
|
}
|
||||||
|
|
||||||
$crop->update(array_merge($request->input()));
|
$crop->update(array_merge($request->input(), $input));
|
||||||
|
|
||||||
return $this->success('修改成功');
|
return $this->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue