From b5657aa4979bd9159959ba248fd6dddef5523f8a Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 13 Dec 2014 11:40:34 +0000 Subject: [PATCH] Flesh out the incidents page --- app/controllers/DashboardController.php | 5 ++++- app/views/dashboard/incidents.blade.php | 26 +++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index 0ad7497d..99ccc29b 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -27,8 +27,11 @@ class DashboardController extends Controller { * @return \Illuminate\View\View */ public function showIncidents() { + $incidents = Incident::all(); + return View::make('dashboard.incidents')->with([ - 'pageTitle' => 'Incidents - Dashboard' + 'pageTitle' => 'Incidents - Dashboard', + 'incidents' => $incidents ]); } diff --git a/app/views/dashboard/incidents.blade.php b/app/views/dashboard/incidents.blade.php index d5c84504..8110975e 100644 --- a/app/views/dashboard/incidents.blade.php +++ b/app/views/dashboard/incidents.blade.php @@ -9,14 +9,28 @@
-
Foo
-
Bar
-
Baz
+
+
+
+

Incidents

+ + @if ($incidents->count() === 0) + Woah! No incidents, your doing well! + @endif +
+
+
+
+
+
+

Incident Templates

+
+
+