我也不知道自己调了什么

This commit is contained in:
2021-01-28 17:01:54 +08:00
parent 991ede234d
commit 33c52431a0
21 changed files with 27637 additions and 27066 deletions

View File

@@ -19,7 +19,7 @@ class CategoryController extends Controller
$parent = getTopCate($category->id);
$template = array_flip(config('haai.category'));
if (isset($template[$category->id])) {
if (isset($template[$category->id]) && !in_array($category->id, config('haai.no_list'))) {
return view('category.' . $template[$category->id], compact('category', 'parent'));
}
@@ -37,7 +37,7 @@ class CategoryController extends Controller
$take = 16;
$template = 'category.persons';
}
$articles = Article::where('category_id', $category->id)
->where('status', 1)
->latest('sort')
@@ -46,6 +46,10 @@ class CategoryController extends Controller
$parent = getTopCate($category->id);
if (in_array($category->id, [55, 54]) && $category->children->isEmpty()) {
$parent = $category->parent;
}
return view($template, compact('category', 'parent', 'articles'));
}