微调
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();
|
||||
$articles = $category->relations(Category::TYPE_ARTICLE)->where('status', 1)->latest()->paginate();
|
||||
$parent = $category;
|
||||
if ($parent->childrens->isEmpty()) {
|
||||
$parent = $category->parent;
|
||||
|
||||
Reference in New Issue
Block a user