PHPackages                             fmendoza/mxdb - 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. fmendoza/mxdb

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

fmendoza/mxdb
=============

Mxdb is a package for Laravel 4, providing the states and cities of Mexico.

263PHP

Since Feb 24Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fmendoza/laravel-mx-db)[ Packagist](https://packagist.org/packages/fmendoza/mxdb)[ RSS](/packages/fmendoza-mxdb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Mxdb
============

[](#laravel-mxdb)

Mxdb is a package for Laravel 4, providing the states and cities of Mexico.

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

[](#installation)

Add `fmendoza/mxdb` to `composer.json`.

```
"fmendoza/mxdb": "dev-master"

```

Run `composer update` to pull down the latest version.

Edit `app/config/app.php` and add the `provider`

```
'providers' => array(
    'Fmendoza\Mxdb\MxdbServiceProvider',
)

```

Now add the alias.

```
'aliases' => array(
    'State' => 'Fmendoza\Mxdb\StateFacade',
    'City' => 'Fmendoza\Mxdb\CityFacade',
)

```

Model
-----

[](#model)

This is an optional step, it contains the tables name and does not need to be altered. If the default name `states` and `cities` suits you, leave it. Otherwise run the following command

```
$ php artisan config:publish fmendoza/mxdb

```

Next generate the migration file:

```
$ php artisan mxdb:migration

```

It will generate the `_setup_states_table.php` and `_setup_cities_table.php` migrations and the `MexicoSeeder.php` seeder. To make sure the data is seeded insert the following code in the `seeds/DatabaseSeeder.php`

```
$this->call('MexicoSeeder');
$this->command->info('Seeded the states and cities!');

```

You may now run it with the artisan migrate command:

```
$ php artisan migrate --seed

```

After running this command the filled states and cities tables will be available

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f39dcd3fad4343a3f683f12bbc3cb5e7347eeb1516fe4cfd8b92456c1dcacb93?d=identicon)[fmendoza](/maintainers/fmendoza)

### Embed Badge

![Health badge](/badges/fmendoza-mxdb/health.svg)

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

PHPackages © 2026

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