Update HomeController.php

This commit is contained in:
innocente205
2020-04-30 16:08:22 +07:00
committed by GitHub
parent 0249b8db7a
commit 5122fc18f5
+1 -1
View File
@@ -52,7 +52,7 @@ class HomeController extends Controller
// Latest Articles/News Block
$articles = cache()->remember('latest_article', $expiresAt, fn () => Article::latest()->take(1)->get());
foreach ($articles as $article) {
$article->newNews = ($user->updated_at->subDays(3)->getTimestamp() < $article->created_at->getTimestamp()) ? 1 : 0 ;
$article->newNews = ($user->updated_at->subDays(3)->getTimestamp() < $article->created_at->getTimestamp()) ? 1 : 0;
}
// Latest Torrents Block