remove covid

This commit is contained in:
Mohamed jinas
2024-01-06 16:21:37 +05:00
parent 40c53aa1d6
commit 198e2969bd
2 changed files with 9 additions and 7 deletions

View File

@@ -39,12 +39,12 @@ class HomeController extends Controller
})->unique('source.name')->values();
});
$covid19 = config("karudhaas.topic_filters.covid19");
$covid19_articles = Cache::remember("home.articles.covid19", 3600, function () use ($covid19) { // Cache for an hour
return Article::with('source')->whereHas('topics', function ($q) use ($covid19) {
$q->whereIn('slug', $covid19["keys"]);
})->latest('published_date')->limit(5)->get();
});
// $covid19 = config("karudhaas.topic_filters.covid19");
// $covid19_articles = Cache::remember("home.articles.covid19", 3600, function () use ($covid19) { // Cache for an hour
// return Article::with('source')->whereHas('topics', function ($q) use ($covid19) {
// $q->whereIn('slug', $covid19["keys"]);
// })->latest('published_date')->limit(5)->get();
// });
$business = config("karudhaas.topic_filters.business");
$business_articles = Cache::remember("home.articles.business", 3600, function () use ($business) { // Cache for an hour
@@ -62,7 +62,7 @@ class HomeController extends Controller
return view('home', [
"todays_pick" => $todays_pick,
"covid19_articles" => $covid19_articles,
// "covid19_articles" => $covid19_articles,
"business_articles" => $business_articles,
"sports_articles" => $sports_articles
]);