Administrative provides an easy way to scaffold political administrative division (like, region, provinces, communes) to your app.
This package provide a command to create the neccesary to work with political administrative division on your database., (*1)
The make:administrative
command will provide you with Region, Province and Commune models, the migrations for those models and seeders for some countries, (*2)
To get the last version of Administrative use, (*3)
composer require lcjury/administrative
or add to your composer.json
file, (*4)
"require": { "lcjury/administrative": "^0.0.0" },
once installed you should add the AdministrativeServiceProvider
to your config/app.php
file, (*5)
'providers' => [ Lcjury\Administrative\AdministrativeServiceProvider::class ];
Just run artisan make:administrative
and then add $this->call(PoliticalTablesSeeder::class);
to the DatabaseSeeder
file and run artisan db:seed
, (*6)