This commit is contained in:
2021-01-22 13:41:40 +08:00
parent a3c427d0f9
commit b2c4ba053f
7 changed files with 166 additions and 43 deletions

View File

@@ -17,7 +17,12 @@ class IndexController extends Controller
public function index()
{
//随手拍
$ssp = ArticlePicture::orderBy('sort', 'desc')->where('category_id', 6)->take(3)->get();
$ssp = ArticlePicture::latest()
->where('category_id', 6)
->where('pictures', '<>', '[]')
->take(4)
->get();
//最新资讯
$all_articles = Article::latest()
->whereNotIn('category_id', [20, 21, 22])