Merge branch 'master' of http://git.yuzhankeji.cn/xuanchen/new_nyfh
This commit is contained in:
@@ -18,7 +18,11 @@ class CategoryController extends Controller
|
|||||||
if ($category->type == Category::TYPE_SHOW && $category->article_id) {
|
if ($category->type == Category::TYPE_SHOW && $category->article_id) {
|
||||||
return redirect("articles/" . $category->article_id);
|
return redirect("articles/" . $category->article_id);
|
||||||
} else {
|
} else {
|
||||||
$articles = $category->relations(Category::TYPE_ARTICLE)->where('status', 1)->latest()->paginate();
|
$articles = $category->relations(Category::TYPE_ARTICLE)
|
||||||
|
->where('status', 1)
|
||||||
|
->latest('sort')
|
||||||
|
->latest()
|
||||||
|
->paginate();
|
||||||
$parent = $category;
|
$parent = $category;
|
||||||
|
|
||||||
if ($category->childrens->isEmpty() && $category->parent) {
|
if ($category->childrens->isEmpty() && $category->parent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user