微调
This commit is contained in:
@@ -45,6 +45,14 @@ class CategoryController extends Controller
|
||||
->latest('created_at')
|
||||
->paginate();
|
||||
|
||||
} elseif ($category->id == 7) {
|
||||
$categories = Category::get();
|
||||
$children = array_merge([$category->id], getAllChild($categories, $category->id));
|
||||
$articles = Article::ByCategory($children)
|
||||
->where('status', 1)
|
||||
->latest('sort')
|
||||
->latest('created_at')
|
||||
->paginate();
|
||||
} else {
|
||||
$articles = $category->relations($category->type)
|
||||
->where('status', 1)
|
||||
|
||||
Reference in New Issue
Block a user