Skip to content

Commit

Permalink
Visa inte äldre än 7 dagar på mest läst på startsidan
Browse files Browse the repository at this point in the history
  • Loading branch information
bonny committed Apr 24, 2024
1 parent 8868a2a commit c59d5ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c59d5ef

Please sign in to comment.