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 2d 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 49% 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

2648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d137ac84c17b18cb154f28502063547bcdc18a1e85c866b90c7ae59a77b5b838?d=identicon)[JosephMendez](/maintainers/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

[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)[webpatser/laravel-countries

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x and 12.x.

8272.8M8](/packages/webpatser-laravel-countries)[pragmarx/countries-laravel

Countries for Laravel

1471.1M2](/packages/pragmarx-countries-laravel)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28134.6k](/packages/stidges-laravel-country-flags)

PHPackages © 2026

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