From 7a4ec0535d9ff024db9592fdfbf7f7b433e18c58 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 21 Jan 2018 18:49:12 +0000 Subject: [PATCH] Fixes part of #2775 --- app/Http/Controllers/Api/IncidentUpdateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/IncidentUpdateController.php b/app/Http/Controllers/Api/IncidentUpdateController.php index a12bca89..55ece5c2 100644 --- a/app/Http/Controllers/Api/IncidentUpdateController.php +++ b/app/Http/Controllers/Api/IncidentUpdateController.php @@ -38,7 +38,7 @@ class IncidentUpdateController extends AbstractApiController */ public function index(Incident $incident) { - $updates = IncidentUpdate::orderBy('created_at', 'desc'); + $updates = $incident->updates()->orderBy('created_at', 'desc'); if ($sortBy = Binput::get('sort')) { $direction = Binput::has('order') && Binput::get('order') == 'desc';