PHPackages                             brocard/geolocation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brocard/geolocation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

brocard/geolocation
===================

Set a geolocation tables for any projects

v0.4(8y ago)188MITPHPPHP &gt;=5.6.4

Since Feb 2Pushed 8y ago2 watchersCompare

[ Source](https://github.com/brocard/geonames)[ Packagist](https://packagist.org/packages/brocard/geolocation)[ RSS](/packages/brocard-geolocation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Library to fetch data from geonames.org
=======================================

[](#library-to-fetch-data-from-geonamesorg)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d744823521a3c2bb6ab6921e660f9c3cb47909b50e0e166f01b7711dec15b1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62726f636172642f67656f6c6f636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brocard/geolocation)[![GitHub license](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://raw.githubusercontent.com/brocard/geonames/master/LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/81cbce4eb0d6c042860c7f4b595a3e090a2898fe3cd7f0c63f6a7a6189fe50fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62726f636172642f67656f6c6f636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brocard/geolocation)[![StyleCI](https://camo.githubusercontent.com/9f76128ada8455ff5001219cb26803c29f06de2065d1c3924476744c8e19f7a6/68747470733a2f2f7374796c6563692e696f2f7265706f732f33303630363537352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/30606575)

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

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

    // Package Service Providers
    BrocardJr\Geo\GeoServiceProvider::class,
    // ...

    // 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 api.geonames.org

```
php artisan geo:import-countries

```

Get states from api.geonames.org

```
php artisan geo:import-states

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~151 days

Total

2

Last Release

3231d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03cb8ed6caf77160c0c50a3bb054653ccfcb2ff8313d3b57999c388d8b5d3afe?d=identicon)[brocard](/maintainers/brocard)

---

Top Contributors

[![brocard](https://avatars.githubusercontent.com/u/1900503?v=4)](https://github.com/brocard "brocard (33 commits)")

---

Tags

geonameslaravellaravelpackagegeonameslaravel 5.3brocard

### Embed Badge

![Health badge](/badges/brocard-geolocation/health.svg)

```
[![Health](https://phpackages.com/badges/brocard-geolocation/health.svg)](https://phpackages.com/packages/brocard-geolocation)
```

###  Alternatives

[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[shivella/laravel-bitly

Laravel package for generating bitly url

75789.0k1](/packages/shivella-laravel-bitly)[gallib/laravel-short-url

A Laravel package to shorten urls

16516.4k](/packages/gallib-laravel-short-url)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[qafeen/manager

Manage, install and search laravel base packages.

122.8k](/packages/qafeen-manager)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
