Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.09k stars 372 forks source link

Laravel 5.4 Support #73

Closed reganjohnson closed 7 years ago

reganjohnson commented 7 years ago

Not working with 5.4

reganjohnson commented 7 years ago

In GeoIPServiceProvider.php change the share() cases to be singleton().

$this->app->singleton('geoip', function ($app)
{
    return new GeoIP($app['config'], $app["session.store"]);
});

$this->app->singleton('command.geoip.update', function ($app)
{
    return new UpdateCommand($app['config']);
});
Torann commented 7 years ago

In the next two days, I'm going to be updating all of my packages.

Torann commented 7 years ago

It looks like you are v0.2, you need to update to v1.0

http://lyften.com/projects/laravel-geoip/doc/upgrade.html

Torann commented 7 years ago

I just pushed a fix for v0.2.

Version 0.2 will no longer be maintained after Laravel 5.4.