refactor: 修改产品分类父级不为自身或子分类

This commit is contained in:
2025-03-06 18:02:23 +08:00
parent 1d2ce3ebe3
commit d49f0a88d8
2 changed files with 42 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ class ProductCategory
$data = array_merge($post, ['language_id' => request()->lang_id]);
$validate = new ProductCategoryValidate;
if (!$validate->check($data)) {
if (!$validate->scene('add')->check($data)) {
return error($validate->getError());
}