Skip to content

Commit

Permalink
Merge pull request #3007 from danijelk/danijelk-patch-2
Browse files Browse the repository at this point in the history
Always take "days of incidents to show" into account
  • Loading branch information
jbrooksuk committed Apr 23, 2018
2 parents b852d87 + 4f0a28f commit 5198cca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/StatusPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public function showIndex()

$allIncidentDays = Incident::where('visible', '>=', (int) !Auth::check())
->select('occurred_at')
->whereBetween('occurred_at', [
$endDate->format('Y-m-d').' 00:00:00',
$startDate->format('Y-m-d').' 23:59:59',
])
->distinct()
->orderBy('occurred_at', 'desc')
->get()
Expand Down

0 comments on commit 5198cca

Please sign in to comment.