修改文章顺序

This commit is contained in:
2020-11-03 11:43:09 +08:00
parent c855f5e4dd
commit 31307a9735

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();
$articles = $category->relations(Category::TYPE_ARTICLE)->latest()->paginate();
$parent = $category;
if ($category->childrens->isEmpty() && $category->parent) {