2017 © Pedro Peláez
 

library mxdb

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

image

fmendoza/mxdb

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

  • Tuesday, February 24, 2015
  • by fmendoza
  • Repository
  • 1 Watchers
  • 1 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Laravel Mxdb

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

Installation

Add fmendoza/mxdb to composer.json., (*2)

"fmendoza/mxdb": "dev-master"

Run composer update to pull down the latest version., (*3)

Edit app/config/app.php and add the provider, (*4)

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

Now add the alias., (*5)

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

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, (*6)

$ php artisan config:publish fmendoza/mxdb

Next generate the migration file:, (*7)

$ php artisan mxdb:migration

It will generate the <timestamp>_setup_states_table.php and <timestamp>_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, (*8)

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

You may now run it with the artisan migrate command:, (*9)

$ php artisan migrate --seed

After running this command the filled states and cities tables will be available, (*10)

The Versions

24/02 2015

dev-master

9999999-dev

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

  Sources   Download

The Requires

  • php >=5.3.0

 

by Fernando Mendoza

laravel mexico