Skip to content

Commit

Permalink
Behåll 3 dagars sök
Browse files Browse the repository at this point in the history
  • Loading branch information
bonny committed Jun 7, 2024
1 parent 1ae387d commit 95b5d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/PixelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function pixelSok(Request $req) {

// För att undvika att settings-fältet blir för stort
// så tar vi bort gamla sökningar innan vi sparar.
$numDaysBackToKeep = 5;
$numDaysBackToKeep = 3;
$searches = array_filter($searches, function ($search) use ($numDaysBackToKeep) {
$last = Carbon::parse($search['last']);
return $last->diffInDays(Carbon::now()) <= $numDaysBackToKeep;
Expand Down

0 comments on commit 95b5d57

Please sign in to comment.