From 8868a2a132e8a359cd0a78db3d5f310a7dcf8443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A4r=20Thernstr=C3=B6m?= Date: Wed, 24 Apr 2024 08:12:56 +0200 Subject: [PATCH] =?UTF-8?q?=C3=85ngra=20lite=20h=C3=A4ndelser=20som=20blev?= =?UTF-8?q?=20fel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/StartController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/StartController.php b/app/Http/Controllers/StartController.php index 784effef..26733ae1 100644 --- a/app/Http/Controllers/StartController.php +++ b/app/Http/Controllers/StartController.php @@ -135,7 +135,7 @@ public function day(Request $request, $date = null) $afterDate = $date['date']->format('Y-m-d'); $events = CrimeEvent::where('created_at', '<', $beforeDate) - ->where('parsed_date', '>', $afterDate) + ->where('created_at', '>', $afterDate) ->orderBy("parsed_date", "desc") ->with('locations') ->get(); @@ -143,7 +143,7 @@ public function day(Request $request, $date = null) $mostCommonCrimeTypes = CrimeEvent::selectRaw( 'parsed_title, count(id) as antal' ) - ->where('parsed_date', '<', $beforeDate) + ->where('created_at', '<', $beforeDate) ->where('parsed_date', '>', $afterDate) ->groupBy('parsed_title') ->orderByRaw('antal DESC') @@ -323,7 +323,7 @@ function getEventsForToday($date, $daysBack = 3) ->format('Y-m-d'); $events = CrimeEvent::where('created_at', '<', $beforeDate) - ->where('parsed_date', '>', $afterDate) + ->where('created_at', '>', $afterDate) ->orderBy("parsed_date", "desc") ->with('locations') ->limit(300)