Skip to content

Commit

Permalink
Ångra lite händelser som blev fel
Browse files Browse the repository at this point in the history
  • Loading branch information
bonny committed Apr 24, 2024
1 parent 8df8688 commit 8868a2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/StartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ 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();

$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')
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8868a2a

Please sign in to comment.