Skip to content
Importer/updater for data into Eloquent ORM including Models with high efficiency
Branch: master
Clone or download
yurtesen Merge pull request #9 from topclaudy/master
Added Laravel 6 compatibility
Latest commit 75849bd Sep 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Increase cc2 to 200 char length and population to bigInteger Dec 17, 2017
LICENSE Initial commit Jul 10, 2016 Update Mar 16, 2017
composer.json Added Laravel 6 compatibility Sep 16, 2019

Laravel / Lumen / Eloquent Geonames

Latest Stable Version Latest Unstable Version Monthly Downloads Total Downloads Package for Laravel License

This package provides probably the best Eloquent models, most complete SQL schemas and fastest Artisan commands to import/update a local copy of GeoNames databases.


Note: If you are using Lumen. You have to first install irazasyed/larasupport !

Please include the following require in your composer.json :

    "require": {
        "yurtesen/geonames": "dev-master"

or install using command line :

composer require yurtesen/geonames:dev-master

after installation, you will need to add the service provider in your config\app.php to 'providers' array


or for Lumen add service provider in bootstrap\app.php Remember that irazasyed/larasupport must be registered before.


Usage and Configuration

Please see the wiki for further information

Provided Eloquent Models

Please see the Wiki pages for implementation details.

Name Key Relations Scopes
GeonamesGeoname geoname_id alternateName, timeZone,country admin1,city,countryInfo
GeonamesAlternateName geoname_id geoname
GeonamesCountryInfo iso timezone,continent
GeonamesFeatureCode code
GeonamesLanguageCode iso_639_3
GeonamesTimezone timezone_id
GeonamesHierarchy parent_id
GeonamesAdmin1Code geoname_id geoname,hierarchies
GeonamesAdmin2Code geoname_id geoname,hierarchies


GeoNames file names and corresponding table names created in your database.

Filename Tablename
timeZones.txt geonames_timezones geonames_geonames
countryInfo.txt geonames_country_infos
iso-languagecodes.txt geonames_language_codes geonames_alternate_names geonames_hierarchies
admin1CodesASCII.txt geonames_admin1_codes
admin2Codes.txt geonames_admin2_codes
featureCodes_en.txt geonames_feature_codes

If You Need Help

Please check the wiki for more information about how to utilize the package efficiently and usage examples. If something does not work or if you have a suggestion, please do not hesitate to use the issue tracker.

You can’t perform that action at this time.