调整领导班子

This commit is contained in:
2020-11-05 13:13:24 +08:00
parent 31307a9735
commit ef4a3292a4
8 changed files with 1184 additions and 998 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)->latest()->paginate();
$articles = $category->relations(Category::TYPE_ARTICLE)->where('status', 1)->latest()->paginate();
$parent = $category;
if ($category->childrens->isEmpty() && $category->parent) {
@@ -26,6 +26,9 @@ class CategoryController extends Controller
}
$advert = Advert::where('category_id', 73)->first();
if ($category->id == 4) {
return view('category.list', compact('articles', 'category', 'parent', 'advert'));
}
return view('category.show', compact('articles', 'category', 'parent', 'advert'));
}