This commit is contained in:
2020-09-17 08:58:40 +08:00
parent 1f6ddc1993
commit b266a81b29
6 changed files with 38 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ class CategoryController extends Controller
if ($category->type == Category::TYPE_SHOW && $category->article_id) {
return redirect("articles/" . $category->article_id);
} else {
$articles = $category->relations(Category::TYPE_ARTICLE)->paginate(2);
$articles = $category->relations(Category::TYPE_ARTICLE)->paginate();
$parent = $category;
if ($parent->childrens->isEmpty()) {
$parent = $category->parent;