PHPackages                             josephmmendez/gazetteer - 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. josephmmendez/gazetteer

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

josephmmendez/gazetteer
=======================

A package build on Laravel 5 which provides a list of all the the Countries with their states and suburbs

v1.0(7y ago)0119MITPHP

Since Feb 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/JosephMendez/ausuburban)[ Packagist](https://packagist.org/packages/josephmmendez/gazetteer)[ RSS](/packages/josephmmendez-gazetteer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Gazetteer
=========

[](#gazetteer)

[![Latest Stable Version](https://camo.githubusercontent.com/0024051dec337b130aa9b7aa33820b6fe57fdef28434b8767b972ac4889c6bb7/68747470733a2f2f706f7365722e707567782e6f72672f73756262652f67617a6574746565722f762f737461626c65)](https://packagist.org/packages/subbe/gazetteer)[![Total Downloads](https://camo.githubusercontent.com/f23c354bd83704312e68c2afe2251483a6c8735047b5ea440c26f6e66606be3b/68747470733a2f2f706f7365722e707567782e6f72672f73756262652f67617a6574746565722f646f776e6c6f616473)](https://packagist.org/packages/subbe/gazetteer)[![Latest Unstable Version](https://camo.githubusercontent.com/718f7853e3ab12361a4780837485e859c92e48cc8427f032f5641cbeb2f8e347/68747470733a2f2f706f7365722e707567782e6f72672f73756262652f67617a6574746565722f762f756e737461626c65)](https://packagist.org/packages/subbe/gazetteer)[![License](https://camo.githubusercontent.com/ef4a3a4d25f74fb762495c44398400bf346079bd146f56cb6e4c39d53e1ac157/68747470733a2f2f706f7365722e707567782e6f72672f73756262652f67617a6574746565722f6c6963656e7365)](https://packagist.org/packages/subbe/gazetteer)

A package build on Laravel 5 which provides a list of all the the Countries with their states and suburbs

*Countries available right now:-*

- *Australia*
- *Maldives*

Install
-------

[](#install)

1- `composer require josephmmendez/gazetteer`

Open the file `config\app.php`

Add the following line to the providers array

`Subbe\Gazetteer\GazetteerServiceProvider::class,`

and this to the aliases array

`'Gazetteer' => Subbe\Gazetteer\Facades\GazetteerFacade::class,`

2- `php artisan vendor:publish`

Running this command will publish the migration and seed files to your application's 'migrations' and 'seeds' folder.

Update your `DatabaseSeeder.php` file found in your `database/seeds` folder and add the following to it.

- `$this->call(CountryTableSeeder::class);`
- `$this->call(StateTableSeeder::class);`
- `$this->call(SuburbTableSeeder::class);`
- `$this->call(MaldiveIslandsTableSeeder::class);`

Now run

3- `composer dump-autload`

4- `php artisan migrate`

This will add the 'countries', 'states', and 'suburbs' table to your database.

5- `php artisan db:seed`

Populate the tables created.

### Usage

[](#usage)

- `Gazetteer::countries()` -&gt; returns a collection of available countries
- `Gazetteer::countries($country_code)` -&gt; returns an instance of the requested country (searched by country code)
- `Gazetteer::countries($country_name)` -&gt; returns an instance of the requested country (searched by country name)
- `Gazetteer::states($country_code)` -&gt; returns a collection of states for a given country (searched by country code)
- `Gazetteer::states($country_name)` -&gt; returns a collection of states for a given country (searched by country name)
- `Gazetteer::suburbs($country, $states)` -&gt; returns a collection of states for a given country (searched by country name)
- `Gazetteer::suburb($input)` -&gt; returns an instance of a suburb for a given postcode (searched by postcode)
- `Gazetteer::suburb($input)` -&gt; returns an instance of a suburb for a given suburb name (searched by suburb name)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Unknown

Total

1

Last Release

2696d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1498448?v=4)[Joseph ](/maintainers/JosephMendez)[@JosephMendez](https://github.com/JosephMendez)

---

Tags

laravelcountriesstatesatlassuburbsgazetteer

### Embed Badge

![Health badge](/badges/josephmmendez-gazetteer/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1731.9M](/packages/dougsisk-laravel-country-state)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8231.3k1](/packages/dipeshsukhia-laravel-country-state-city-data)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[usamamuneerchaudhary/country-city-state

Country City State Data Provider for Laravel 12+

242.7k](/packages/usamamuneerchaudhary-country-city-state)

PHPackages © 2026

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