This commit is contained in:
2020-09-17 08:57:27 +08:00
parent ac3b53b163
commit a4162b5710
9 changed files with 223 additions and 157 deletions

View File

@@ -20,7 +20,7 @@ class CategoryController extends Controller
} else {
$articles = $category->relations(Category::TYPE_ARTICLE)->paginate(8);
$parent = $category;
if ($category->childrens->isEmpty()) {
if ($category->childrens->isEmpty() && $category->patent) {
$parent = $category->parent;
}