Set a geolocation tables for any projects

v0.4 2017-07-04 14:31 UTC

This package is auto-updated.

Last update: 2023-03-15 00:22:28 UTC


Latest Version on Packagist GitHub license Total Downloads StyleCI

Add the Geoname service provider to the config/app.php file in the providers array:

'providers' => [
    // Laravel Framework Service Providers...

    // Package Service Providers
    // ...

    // Application Service Providers
    // ...

For first instance you only need set enviroment variable intro .env file in root directoy

example:  GEONAMES_USERNAME=your_username

You may easily access your configuration values using the global config helper function only run the next artisan command

php artisan vendor:publish --provider="BrocardJr\Geo\GeoServiceProvider"

Reload de config for some changes

php artisan vendor:publish --provider="BrocardJr\Geo\GeoServiceProvider" --tag=config --force

Install migrations

php artisan geo:install

Get countries from

php artisan geo:import-countries

Get states from

php artisan geo:import-states