Fix the view composer, don't poorly check incident statuses

This commit is contained in:
James Brooks 2014-11-19 13:36:45 +00:00
parent 410843516b
commit 4d967c08bd

View File

@ -7,7 +7,7 @@
->groupBy('status')
->orderBy('status', 'desc');
if ($incidents->count() === 0 || (int) $incidents->first()->status === 4) {
if ($incidents->get()->count() === 1 || (int) $incidents->first()->status === 4) {
$status = 'success';
$message = 'All systems are functional.';
} else {