Update HomeController.php

This commit is contained in:
2021-05-07 07:25:06 +05:00
parent 925bd60c9e
commit 59093efc3a

View File

@@ -43,21 +43,21 @@ class HomeController extends Controller
$covid19 = config("karudhaas.topic_filters.covid19");
$covid19_articles = Cache::remember("home.articles.covid19", 600, function () use ($covid19) {
return Article::with('source')->whereHas('topics', function ($q) use ($covid19) {
$q->whereIn('slug', ['mndf']);
$q->whereIn('slug', $covid19["keys"]);
})->latest('published_date')->limit(5)->get();
});
$business = config("karudhaas.topic_filters.business");
$business_articles = Cache::remember("home.articles.business", 600, function () use ($business) {
return Article::with('source')->whereHas('topics', function ($q) use ($business) {
$q->whereIn('slug', ['mndf']);
$q->whereIn('slug', $business["keys"]);
})->latest('published_date')->limit(4)->get();
});
$sports = config("karudhaas.topic_filters.sports");
$sports_articles = Cache::remember("home.articles.sports", 600, function () use ($sports) {
return Article::with('source')->whereHas('topics', function ($q) use ($sports) {
$q->whereIn('slug', ['mndf']);
$q->whereIn('slug',$sports["keys"]);
})->latest('published_date')->limit(4)->get();
});