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.11k stars 372 forks source link

Update & Config #32

Closed jrean closed 8 years ago

jrean commented 9 years ago

Hi,

Just want to let you know I made some composer update these past few days and visibly you updated your package (I checked the commits history).

My app is tied with ~0.2 and after the update it started to stop working... Undefined index: database_path

I knew it has something to do with the config... When running php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" it said Publishing Complete! (I had already your config published).

I had to manually delete the config file then re-run php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" to make it works.

Is that normal?

(Very cool the php artisan geoip:update)

shabith commented 9 years ago

Yes I can confirm that same thing happened to me. I got the same error and republishing the config file fixed it.

cringerjs commented 9 years ago

This is normal for Laravel as the publish command will not overwrite unless you specify it to. Just run it with the force option and it should work correctly.

php artisan vendor:publish --provider="Torann\GeoIP\GeoIP\GeoIPServiceProvider" --force

We should definitely check to make sure the file was written, however, before displaying the complete message.

Torann commented 8 years ago

Sorry, the new version is going to do a better job a anticipating new config values.

jrean commented 8 years ago

Awesome!!