修改列表
This commit is contained in:
@@ -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(8);
|
||||
$articles = $category->relations(Category::TYPE_ARTICLE)->where('status', 1)->latest()->paginate(8);
|
||||
$parent = $category;
|
||||
if ($category->childrens->isEmpty() && $category->parent) {
|
||||
$parent = $category->parent;
|
||||
|
||||
Reference in New Issue
Block a user