Basic output of incidents

This commit is contained in:
James Brooks
2014-11-16 23:17:34 +00:00
parent ba6892e858
commit fab38a766d
6 changed files with 44 additions and 23 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
$incidentDate = Carbon::now()->subDays($i);
$incidents = Incident::where('created_at', $incidentDate)->get()
?>
<li>
<h1>{{ $incidentDate->format('jS M, Y') }}</h1>
<ul>
@if($incidents->count() === 0)
<li>No incidents reported.</li>
@else
@foreach($incidents as $incident)
<li>
<h2>{{ $incident->name }}</h2>
<p>{{ $incident->message }}</p>
</li>
@endforeach
@endif
</ul>
</li>
+9
View File
@@ -0,0 +1,9 @@
@extends('layout.master')
@section('content')
<ul>
@for ($i=0; $i <= 7; $i++)
@include('incident', array('i', $i))
@endfor
</ul>
@stop
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Cachet</title>
</head>
<body>
@section('content')
@show
</body>
</html>