2014-11-19 16:26:42 +00:00
|
|
|
<ul class='list-group'>
|
2014-11-19 13:26:53 +00:00
|
|
|
<?php
|
|
|
|
$incidentDate = Carbon::now()->subDays($i);
|
|
|
|
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
|
|
|
?>
|
2014-11-19 16:26:42 +00:00
|
|
|
<li class='list-group-item active'>
|
|
|
|
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M Y') }}</h3>
|
|
|
|
</li>
|
2014-11-19 13:26:53 +00:00
|
|
|
|
|
|
|
@unless($incidents->count() > 0)
|
2014-11-19 16:26:42 +00:00
|
|
|
<li class='list-group-item'>No incidents reported.</li>
|
2014-11-19 13:26:53 +00:00
|
|
|
@endunless
|
|
|
|
|
2014-11-19 14:41:04 +00:00
|
|
|
@foreach($incidents as $incidentID => $incident)
|
2014-11-19 16:26:42 +00:00
|
|
|
<li class='list-group-item'>
|
|
|
|
<span class='badge badge-{{ $incident->color }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
|
|
|
|
<h4>{{ $incident->name }} <small><time>{{ $incident->created_at->format('H:i:s A') }}</time></small></h4>
|
|
|
|
{{ $incident->message }}
|
|
|
|
@if($incidentID < ($incident->count() - 1))
|
|
|
|
</li>
|
2014-11-19 14:41:04 +00:00
|
|
|
@endif
|
2014-11-19 13:26:53 +00:00
|
|
|
@endforeach
|
2014-11-19 16:26:42 +00:00
|
|
|
</ul>
|