Update HomeController.php

This commit is contained in:
innocente205
2020-04-30 15:56:32 +07:00
committed by GitHub
parent fcc12508d9
commit c1540bea78
+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->new_news=($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