PHPackages                             peergum/geodb - 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. [API Development](/categories/api)
4. /
5. peergum/geodb

ActiveLibrary[API Development](/categories/api)

peergum/geodb
=============

Provides Laravel with geographical databases and APIs

1.1(2y ago)013Apache-2.0PHPPHP ^8.2

Since Nov 23Pushed 2y ago1 watchersCompare

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

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

[![Logo](public/laravel-geodb.png)](public/laravel-geodb.png)

Laravel GeoDB
=============

[](#laravel-geodb)

A Laravel package providing geographical information to your site

**Current Version**: 1.1;

---

Description
-----------

[](#description)

Laravel GeoDB provides your laravel app with a simple way to list countries, states, cities, their geolocation or a combination thereof, without requiring the implementation of a Google or OpenStreetMaps API.

You can access the information directly from your code, through a Facade, or from any reactive view, using internal APIs.

Note that the space used by the database (around 1.6GB for 4.5M cities in 252 countries) may end costing you more than the monthly fees charged by Google. Google may also provide you with better or more accurate results.

Status
------

[](#status)

This package is a work in progress. Please come back soon for more.

Installation
------------

[](#installation)

### 1. Add package

[](#1-add-package)

run `composer require peergum/geodb "^1.1"` in yor laravel site folder

### 2. Setup package

[](#2-setup-package)

Run `art migrate` to install the geodb tables, then:

- For a full install (all countries), run install script: `art geodb:install` or `art geodb:install all`
- For a partial install (just a few countries), run with parameters: e.g. `art geodb:install fr gb us`to install cities for France, Great Britain and USA.

Depending on the number and size of chosen countries, and your server connectivity and speed, download and install can take between a few seconds and much longer. If you request "ALL" in upper case, the install will download and unzip one file with a final size of 1.6GB. If you type "all" in lower case, it will require each country file separately. All downloaded files, zipped and unzipped, are kept under the storage/geodb folder for future re-runs. The -U or --update option can be passed to force a redownload of the requested countries/files.

### 3. Update caches

[](#3-update-caches)

If you're using Inertia, re-run `npm run build` in order to update your vite cache.

### 4. Check status

[](#4-check-status)

Go to `/geodb` on your site, to confirm number of countries, states and cities loaded. If you have inertia/vue installed, you can also use the city search field in the page to check how fast the response time is (depending on your DB server and connectivity)

Screenshot without Vue (partial load): [![example_1.png](example_1.png)](example_1.png)

Screenshot after Breeze install (partial load): [![example_2.png](example_2.png)](example_2.png)

ChangeLog
---------

[](#changelog)

See [here](./CHANGELOG.md)

---

**License**: [Apache2](./LICENSE)

**Author**: Phil Hilger AKA "PeerGum"

**About Me**:

- [My Page](https://phil.hilger.ca)
- [Github](https://github.com/peergum)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~1 days

Total

7

Last Release

890d ago

Major Versions

0.1.0 → 1.0-beta2023-11-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/16edb2b130005732f18a8bac680aa07139a6afd2ea5f9ef0a7df4ae4232f478e?d=identicon)[peergum](/maintainers/peergum)

---

Top Contributors

[![peergum](https://avatars.githubusercontent.com/u/2577472?v=4)](https://github.com/peergum "peergum (14 commits)")

---

Tags

apilaravelcountriesstatescities

### Embed Badge

![Health badge](/badges/peergum-geodb/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M110](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[igaster/laravel_cities

Seed all countries/cities from geonames.org database. Searchable DB tree, ready to use API &amp; a bonus vue.js component!

17988.7k1](/packages/igaster-laravel-cities)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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