roshan-dhungana / nepal-geography
Reusable Nepal provinces, districts and municipalities dataset for Laravel
Package info
github.com/dhunganaroshan341/NepalGeographyComposerLaravel
pkg:composer/roshan-dhungana/nepal-geography
v1.2.4
2026-06-20 16:39 UTC
Requires
- php: ^8.2
- illuminate/support: ^10.0|^11.0|^12.0
README
A Laravel package providing Nepal's complete administrative geography dataset, including provinces, districts, municipalities, cities, and wards.
Features
- π³π΅ Nepal country dataset
- ποΈ 7 Provinces
- πΊοΈ 77 Districts
- ποΈ Municipalities and Rural Municipalities
- ποΈ Cities
- π Wards
- Eloquent-ready database structure
- Automated installation command
- Supports Laravel 10, 11, and 12
- Supports PHP 8.2+
Installation
Install the package via Composer:
composer require roshan-dhungana/nepal-geography
Setup
Run the installation command:
php artisan nepal:install
The installer will automatically:
- Publish Nepal geography JSON data
- Run package migrations
- Seed Nepal geography records
Fresh Installation
To completely rebuild your database:
php artisan nepal:install --fresh
Or skip confirmation:
php artisan nepal:install --fresh --force
β οΈ Warning:
This command will delete all existing database tables and recreate them.
The installer will:
- Publish Nepal geography JSON data
- Run migrate:fresh
- Recreate all tables
- Seed Nepal geography data
Database Structure
Country
βββ Province
βββ District
βββ Municipality
βββ City
βββ Ward
Example Usage
Provinces
use RoshanDhungana\NepalGeography\Models\State; $province = State::first();
Districts of a Province
$districts = $province->districts;
Municipality
$municipality = Municipality::first(); $district = $municipality->district;
Province from District
$province = $district->state;
Available Commands
Install
php artisan nepal:install
Fresh Install
php artisan nepal:install --fresh
Skip Confirmation
php artisan nepal:install --fresh --force
Supported Versions
| Package | Support |
|---|---|
| PHP | 8.2+ |
| Laravel | 10.x |
| Laravel | 11.x |
| Laravel | 12.x |
License
MIT License
Author
Roshan Dhungana
GitHub: https://github.com/dhunganaroshan341/NepalGeographyComposerLaravel