diff --git a/app/Http/Controllers/TrackerController.php b/app/Http/Controllers/TrackerController.php index 6f9d223..57bd9da 100644 --- a/app/Http/Controllers/TrackerController.php +++ b/app/Http/Controllers/TrackerController.php @@ -47,20 +47,18 @@ class TrackerController extends Controller if ($fromCheckin) { $tripData->checkins = array_filter( $tripData->checkins, - function ($key) use ($fromCheckin) { - return $key >= $fromCheckin; - }, - ARRAY_FILTER_USE_KEY + function ($checkin) use ($fromCheckin) { + return $checkin->id >= $fromCheckin; + } ); } if ($toCheckin) { $tripData->checkins = array_filter( $tripData->checkins, - function ($key) use ($toCheckin) { - return $key <= $toCheckin; - }, - ARRAY_FILTER_USE_KEY + function ($checkin) use ($toCheckin) { + return $checkin->id <= $toCheckin; + } ); }