From 31445111047f5851778227f78f7edfee1a2bcfa4 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 21 Jan 2023 20:01:11 +0000 Subject: [PATCH] Fix email digests by removing (unused) location property --- app/Http/Controllers/TrackerController.php | 2 +- app/Mail/Digest.php | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/Http/Controllers/TrackerController.php b/app/Http/Controllers/TrackerController.php index 6013a9d..5dfa665 100644 --- a/app/Http/Controllers/TrackerController.php +++ b/app/Http/Controllers/TrackerController.php @@ -232,7 +232,7 @@ class TrackerController extends Controller array_push($points, (object)[ 'id' => $id++, 'latitude' => $lat/100000, - 'longitude'=> $lng/100000 + 'longitude' => $lng/100000 ]); } diff --git a/app/Mail/Digest.php b/app/Mail/Digest.php index 1e40f0c..9d04259 100644 --- a/app/Mail/Digest.php +++ b/app/Mail/Digest.php @@ -64,14 +64,6 @@ class Digest extends Mailable default: } - $this->locations = array_filter( - $trip->locations, - function ($elem) use ($cutoffDateTime) { - $elemDateTime = new DateTime($elem->created_at); - return $elemDateTime > $cutoffDateTime; - } - ); - $this->checkinsList = array_filter( $trip->checkins, function ($elem) use ($cutoffDateTime) {