public function get($ip)
    {
        $data = $this->getRaw($ip);

        if (empty($data)) {
            return $this->getDefault();
        }

        return [
            'city' => $data->city->name,
            'country' => $data->country->name,
            'countryCode' => $data->country->isoCode,
            'latitude' => (float) number_format($data->location->latitude, 5),
            'longitude' => (float) number_format($data->location->longitude, 5),
            'region' => $data->mostSpecificSubdivision->name,
            'regionCode' => $data->mostSpecificSubdivision->isoCode,
            'continent' => $data->continent->name,
            'continentCode' => $data->continent->code,
            'timezone' => $data->location->timeZone,
            'postalCode' => $data->postal->code,
        ];
    }
public function get($ip)
    {
        $data = $this->getRaw($ip);

        if (empty($data)) {
            return $this->getDefault();
        }

        return [
            'city' => $data->city->name,
            'country' => $data->country->name,
            'countryCode' => $data->country->isoCode,
            'latitude' => (float) number_format($data->location->latitude, 5),
            'longitude' => (float) number_format($data->location->longitude, 5),
            'region' => $data->mostSpecificSubdivision->name,
            'regionCode' => $data->mostSpecificSubdivision->isoCode,
            'continent' => $data->continent->name,
            'continentCode' => $data->continent->code,
            'timezone' => $data->location->timeZone,
            'postalCode' => $data->postal->code,
        ];
    }
public function get ( $ ip ) { $ data = $ this -> getRaw ( $ ip ) ; if ( empty ( $ data ) ) { return $ this -> getDefault ( ) ; } return [ 'city' => $ data -> city -> name , 'country' => $ data -> country -> name , 'countryCode' => $ data -> country -> isoCode , 'latitude' => ( float ) number_format ( $ data -> location -> latitude , 5 ) , 'longitude' => ( float ) number_format ( $ data -> location -> longitude , 5 ) , 'region' => $ data -> mostSpecificSubdivision -> name , 'regionCode' => $ data -> mostSpecificSubdivision -> isoCode , 'continent' => $ data -> continent -> name , 'continentCode' => $ data -> continent -> code , 'timezone' => $ data -> location -> timeZone , 'postalCode' => $ data -> postal -> code , ] ; }
Get array of data using Maxmind.

@param string $ip

@return array
Get array of data using Maxmind .