Closed selim-mahmud closed 5 years ago
Sounds like it's not being added to you service provider config file. Did you follow the install directions?
I just ran into this issue myself after upgrading. You can't inject Torann\GeoIP\GeoIP
directly. You need to use the abstract 'geoip' that properly supplies the configuration parameters. I recommend adding this to your AppServiceProvider::register:
$this->app->alias('geoip', \Torann\GeoIP\GeoIP::class);
This way you will be able to inject the configured instance properly wherever you want to use it.
I have installed Laravel Geoip package in my laravel 5.3 project. When I use geoip() helper function, it working fine. But, when I use Torann\GeoIP\GeoIP, its showing following error:
Unresolvable dependency resolving [Parameter #0 [ $app ]] in class Illuminate\Support\ServiceProvider