diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 99f3614..3b8ff84 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -165,7 +165,7 @@ class ActivityController extends Controller } public function getActivityLast($parentId){ - $activity = Activity::where('parent_id', $parentId)->orderByRaw('actual_start DESC')->first(); + $activity = Activity::where('parent_id', $parentId)->orderByRaw('actual_end DESC')->first(); if (!isset($activity)) { return null; }