Closed rtiagom closed 3 years ago
Hello @rtiagom ,
Thanks for the notice. The README file of our GeoIP2 provider is indeed outdated.
Could you submit a PR to update it ? Here is the file to update: https://github.com/geocoder-php/Geocoder/blob/master/src/Provider/GeoIP2/README.md
@jbelien will do
The GeoIP2 example is broken.
https://github.com/geocoder-php/geoip2-provider
//Use a Maxmind GeoIP2 Database: $reader = new \GeoIp2\Database\Reader('/path/to/geolite2.mmdb');
$adapter = new \Geocoder\Provider\GeoIP2\GeoIP2Adapter($reader); $geocoder = new \Geocoder\Provider\GeoIP2\GeoIP2($adapter);
$address = $geocoder->geocode('74.200.247.59')->first();
Call to undefined method Geocoder\Provider\GeoIP2\GeoIP2::geocode()
Based on the available methods in $geocoder, it should be this: $geocoder->geocodeQuery(GeocodeQuery::create('74.200.247.59'))->first();