PHP code example of anuzpandey / laravel-nepal-geo
1. Go to this page and download the library: Download anuzpandey/laravel-nepal-geo library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
anuzpandey / laravel-nepal-geo example snippets
return [
];
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,
]);
}
}
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,
]);
}
}