This package provides a Laravel Migration and Seeder Files for Province, Districts and City of the country Nepal.
You can install the package via composer:
composer require anuzpandey/laravel-nepal-geo
You can publish and run the migrations with:
php artisan vendor:publish --tag="nepal-geo-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="nepal-geo-config"
This is the contents of the published config file:
return [
];
After running the migrations, you can use the following seeder classes to seed the data.
use AnuzPandey\LaravelNepalGeo\Database\Seeders\NepalGeoSeeder;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
$this->call([
// This will seed the data for Nepal's Province, Districts and City
NepalGeoSeeder::class,
]);
}
}
Or you can include individual seeder classes to seed the data.
use AnuzPandey\LaravelNepalGeo\Database\Seeders\DistrictSeeder;
use AnuzPandey\LaravelNepalGeo\Database\Seeders\CitySeeder;
use AnuzPandey\LaravelNepalGeo\Database\Seeders\StateSeeder;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
$this->call([
StateSeeder::class,
DistrictSeeder::class,
CitySeeder::class,
]);
}
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.