diff --git a/app/Http/Controllers/RouteController.php b/app/Http/Controllers/RouteController.php index 0af8f89..6daf92a 100644 --- a/app/Http/Controllers/RouteController.php +++ b/app/Http/Controllers/RouteController.php @@ -117,9 +117,8 @@ class RouteController extends Controller // Download the GPX file for a specific route and sport public function downloadGpx($id, $sportId) { - $routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId]) - ->first(); - $file = storage_path("app/{$routeDetail->gpx_path}"); + $routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])->first(); + $file = storage_path("{$routeDetail->gpx_path}"); return response()->download($file); }