Include changes required within View Composers
This commit is contained in:
@@ -79,3 +79,5 @@ App::down(function()
|
||||
*/
|
||||
|
||||
require app_path().'/filters.php';
|
||||
|
||||
require app_path().'/view-composers.php';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->get();
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
||||
?>
|
||||
<li>
|
||||
<li class='list-group-item'>
|
||||
<h1>{{ $incidentDate->format('jS M, Y') }}</h1>
|
||||
<ul>
|
||||
<ul class='list-group'>
|
||||
@if($incidents->count() === 0)
|
||||
<li>No incidents reported.</li>
|
||||
<li class='list-group-item'>No incidents reported.</li>
|
||||
@else
|
||||
@foreach($incidents as $incident)
|
||||
<li>
|
||||
<li class='list-group-item'>
|
||||
<h2>{{ $incident->name }}, <small>{{ $incident->humanStatus }}</small></h2>
|
||||
<h3><time>{{ $incident->created_at->format('H:i:s A') }}</time></h3>
|
||||
<p>{{ $incident->message }}</p>
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
<ul>
|
||||
@foreach(Component::get() as $component)
|
||||
<li>
|
||||
{{ $component->name }}
|
||||
@if($component->description)
|
||||
<small>{{ $component->description }}</small>
|
||||
@endif
|
||||
<div class='row'>
|
||||
<div class='alert alert-{{ $systemStatus }}'>{{ $systemMessage }}</div>
|
||||
</div>
|
||||
|
||||
<span class='pull-right'>
|
||||
{{ $component->humanStatus }}
|
||||
</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class='row'>
|
||||
<ul class='list-group'>
|
||||
@foreach(Component::get() as $component)
|
||||
<li class='list-group-item'>
|
||||
{{ $component->name }}
|
||||
@if($component->description)
|
||||
<small>{{ $component->description }}</small>
|
||||
@endif
|
||||
|
||||
<h1>Past Incidents</h1>
|
||||
<ul>
|
||||
@for($i=0; $i <= 7; $i++)
|
||||
@include('incident', array('i', $i))
|
||||
@endfor
|
||||
</ul>
|
||||
<span class='pull-right'>{{ $component->humanStatus }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<h1>Past Incidents</h1>
|
||||
<ul class='list-group'>
|
||||
@for($i=0; $i <= 7; $i++)
|
||||
@include('incident', array('i', $i))
|
||||
@endfor
|
||||
</ul>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user