Closes #1. Incidents output per-date
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::where('created_at', $incidentDate)->get()
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->get();
|
||||
?>
|
||||
<li>
|
||||
<h1>{{ $incidentDate->format('jS M, Y') }}</h1>
|
||||
@@ -11,6 +11,7 @@
|
||||
@foreach($incidents as $incident)
|
||||
<li>
|
||||
<h2>{{ $incident->name }}</h2>
|
||||
<h3><time>{{ $incident->created_at->format('H:i:s A') }}</time></h3>
|
||||
<p>{{ $incident->message }}</p>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user