Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config is ignored #6

Closed
marcin-derlukiewicz opened this issue Aug 24, 2015 · 4 comments
Closed

config is ignored #6

marcin-derlukiewicz opened this issue Aug 24, 2015 · 4 comments

Comments

@marcin-derlukiewicz
Copy link

after recent updates config file is ignored and everything tries to connect to ip-api

@pulkitjalan
Copy link
Owner

which version are you using?

@marcin-derlukiewicz
Copy link
Author

@dev
27 sie 2015 17:26 "Pulkit Jalan" notifications@github.com napisał(a):

which version are you using?


Reply to this email directly or view it on GitHub
#6 (comment).

@pulkitjalan
Copy link
Owner

can you try again with the latest version, I am unable to replicate this issue.

@kyranb
Copy link

kyranb commented Mar 30, 2016

I'm experiencing this on dev-master.

$config in the constructor here: https://github.com/pulkitjalan/geoip/blob/master/src/GeoIP.php#L39

Only contains: [ "driver" => "ip-api"]

It seems as though config('geoip') can't be accessed inside of this anonymous function in the GeoIpServiceProvider:

protected function registerGeoIP()
    {
        $this->app['geoip'] = $this->app->share(function ($app) {
            return new GeoIP(config('geoip'));
        });
    }

Edit, my bad. When not using the Facade, you need to pass in the configuration manually.

Might be worth demonstrating this in the docs for those using Laravel, but not using the Facade 😄

$geoip = new GeoIP(config('geoip'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants