Package Data | |
---|---|
Maintainer Username: | luismarcelino |
Maintainer Contact: | luismarcelino@h-d.pt (Luis Marcelino) |
Package Create Date: | 2015-08-16 |
Package Last Update: | 2015-08-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:08:53 |
Package Statistics | |
---|---|
Total Downloads: | 17 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Freguesias is a Laravel 5 package that provides all administrative regions in Portugal: distritos, concelhos and freguesias.
Add luismarcelino/freguesias
to composer.json
.
"luismarcelino/freguesias": "dev-master"
Run composer update
to pull down the latest version of Freguesias List.
Edit config/app.php
and add the provider
and filter
'providers' => [
Luismarcelino\Freguesias\FreguesiasServiceProvider::class,,
]
Now add the alias.
'aliases' => [
'Freguesias' => Luismarcelino\Freguesias\FreguesiasFacade::class,
]
Optionaly you can publishing the configuration if you want to change the default table name freguesias
:
$ php artisan vendor:publish
To generate the migration file use:
$ php artisan freguesias:migration
This will generate the <timestamp>_setup_freguesias_table.php
migration and the FreguesiasSeeder.php
seeder. To run the migration, run as usual:
php artisan migrate:refresh
To run just this seeder user the artisan command:
php artisan db:seed --class=FreguesiasSeeder