diff --git a/app/Service/v3/Implementations/LocationService.php b/app/Service/v3/Implementations/LocationService.php index 8db6f55..561536f 100644 --- a/app/Service/v3/Implementations/LocationService.php +++ b/app/Service/v3/Implementations/LocationService.php @@ -83,13 +83,8 @@ class LocationService implements LocationServiceInterface $m->distance = ''; } } - - $res = collect($res->toArray())->map(function ($res, $key) { - $markets = collect($res)->sortBy('distance_num'); - return $markets; - }); - - return $res; + $res = collect($res)->sortBy('distance_num'); + return $res->values()->all(); } public function getNearestMarket($lng,$lat)