Closed
Description
geoip2/geoip2:v2.3.2
willdurand/geocoder:v3.1.0
From Provider\GeoIP2
:
return $this->returnResults([
$this->fixEncoding(array_merge($this->getDefaults(), array(
'countryCode' => (isset($result->country->iso_code) ? $result->country->iso_code : null),
'country' => (isset($result->country->names->{$this->locale}) ? $result->country->names->{$this->locale} : null),
'locality' => (isset($result->city->names->{$this->locale}) ? $result->city->names->{$this->locale} : null),
'latitude' => (isset($result->location->latitude) ? $result->location->latitude : null),
'longitude' => (isset($result->location->longitude) ? $result->location->longitude : null),
'timezone' => (isset($result->location->time_zone) ? $result->location->time_zone : null),
'postalCode' => (isset($result->location->postal_code) ? $result->location->postal_code : null),
'adminLevels' => $adminLevels,
)))
]);
However, the $result has the following structure:
It should probably be something like:
[
'postalCode' => (isset($result->postal->code) ? $result->postal->code : null),
]
Metadata
Metadata
Assignees
Labels
No labels