dev-master
9999999-dev https://github.com/luismarcelino/postal-ptPostal-PT is a bundle for Laravel with all Portuguese postal codes.
MIT
The Requires
- php >=5.3.0
laravel portugal administrative region postal codes
Postal-PT is a bundle for Laravel with all Portuguese postal codes.
Postal-PT is a Laravel 5 package that provides all post codes in Portugal., (*1)
Add luismarcelino/postal-pt
to composer.json
., (*2)
"luismarcelino/postal-pt": "dev-master"
Run composer update
to pull down the latest version of Postal Codes List., (*3)
Edit config/app.php
and add the provider
and filter
, (*4)
'providers' => [ Luismarcelino\PostalPt\CodigosPostaisServiceProvider::class, ]
Now add the alias., (*5)
'aliases' => [ 'PostalPt' => Luismarcelino\PostalPt\CodigosPostaisFacade::class, ]
Optionaly you can publishing the configuration if you want to change the default table name post_codes_pt
:, (*6)
$ php artisan vendor:publish
To generate the migration file use:, (*7)
$ php artisan postalpt:migration
This will generate the <timestamp>_setup_post_codes_pt_table.php
migration file. To run the migration, run as usual:, (*8)
php artisan migrate
As the amount of the data to be inserted in the 'post_code_pt' table is large, you must use the follow artisan command (there is no 'db:seed' file):, (*9)
php artisan postalpt:seed
Postal-PT is a bundle for Laravel with all Portuguese postal codes.
MIT
laravel portugal administrative region postal codes