文章分类由1变多

This commit is contained in:
2021-04-02 09:30:56 +08:00
parent e2699b7e04
commit 977dd11c7d
19 changed files with 177 additions and 287 deletions

View File

@@ -45,8 +45,8 @@ class CategoryController extends Controller
->pluck('id')
->toArray();
$articles = Article::whereIn('category_id', $cate_ids)
->where('status', 1)
$articles = Article::where('status', 1)
->ByCategory($cate_ids)
->latest('sort')
->latest()
->paginate($take);