diff --git a/config/app.php b/config/app.php index f315ac8..8023908 100644 --- a/config/app.php +++ b/config/app.php @@ -70,6 +70,8 @@ return [ 'current_trip_id' => env('CURRENT_TRIP_ID'), + 'current_trip_ignore' => explode(',', env('CURRENT_TRIP_IGNORE')), + 'past_trip_ids' => explode(',', env('PAST_TRIP_IDS')), /* diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index 64f5aa2..a4b511e 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -62,7 +62,9 @@ */ var routePoints = L.polyline([ @foreach($trip->locations as $location) + @if(!in_array($location->id, config('app.current_trip_ignore'))) [{{ $location->latitude }}, {{ $location->longitude }}], + @endif @endforeach ], { color: '#3d3d3d'