From c59d5ef9e2a0156e52c649abe2d3f12a4c75c0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A4r=20Thernstr=C3=B6m?= Date: Wed, 24 Apr 2024 08:21:57 +0200 Subject: [PATCH] =?UTF-8?q?Visa=20inte=20=C3=A4ldre=20=C3=A4n=207=20dagar?= =?UTF-8?q?=20p=C3=A5=20mest=20l=C3=A4st=20p=C3=A5=20startsidan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Helper.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Helper.php b/app/Helper.php index f50810e6..117a4761 100644 --- a/app/Helper.php +++ b/app/Helper.php @@ -1070,6 +1070,8 @@ public static function getMostViewedEventsRecently( [$minutes] ) ->where('created_at', '<', Carbon::now()) + // Visa inte jättegamla saker, som t.ex. när 7 år gammal artikel Coop i Timrå började visas. Så max en vecka gammal. + ->where('created_at', '>', Carbon::now()->subDays(7)) ->groupBy('createdYMD', 'crime_event_id') ->orderBy('views', 'desc') ->limit($limit)