Update HomeController.php
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user