This commit is contained in:
2022-08-19 17:21:18 +08:00
parent c4536a7454
commit a1e2085bcb

View File

@@ -57,6 +57,10 @@ class CategoryController extends Controller
$parent = $category->parent;
}
if ($category->children->isEmpty()) {
$parent = $category->parent;
}
return view($template, compact('category', 'parent', 'articles'));
}