调整分类

This commit is contained in:
2021-12-10 15:29:00 +08:00
parent 5921a59945
commit ce4dc96c55
2 changed files with 14 additions and 1 deletions

View File

@@ -36,7 +36,8 @@ class CategoryController extends Controller
->paginate();
$parent = $category;
if ($category->childrens->isEmpty() && $category->parent) {
if (! $category->getChildrenCount() && $category->parent) {
$parent = $category->parent;
}