调整领导班子
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)->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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user