edsonalvesan/laravel-citiesbr

Pacote Laravel de Cidades e Estados brasileiros com migrations, models e seeds.

v1.0.0 2016-08-17 15:57 UTC

This package is auto-updated.

Last update: 2024-12-21 20:19:43 UTC


README

Pacote Laravel de Cidades e Estados brasileiros com migrations, models e seeds

Como usar

Adicione o package

$ composer require edsonalvesan/laravel-citiesbr

ou adicione no arquivo composer.json

 "edsonalvesan/laravel-citiesbr": "v1.0.0"

e execute

 composer update

Adicione o Provider no arquivo config/app.php

'providers' => [
    EdsonAlvesan\Cities\CitiesServiceProvider::class
],

Importe migrations/seeds e models

$ php artisan vendor:publish --provider="EdsonAlvesan\Cities\CitiesServiceProvider"

Execute

$ composer dump-auto
$ php artisan migrate
$ php artisan db:seed --class="StatesTableSeeder"
$ php artisan db:seed --class="CitiesTableSeeder"

##Observação O id da tabela States é o código federal do estado.