roshan-dhungana/nepal-geography

Reusable Nepal provinces, districts and municipalities dataset for Laravel

Maintainers

Package info

github.com/dhunganaroshan341/NepalGeographyComposerLaravel

pkg:composer/roshan-dhungana/nepal-geography

Transparency log

Statistics

Installs: 39

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.4 2026-06-20 16:39 UTC

This package is auto-updated.

Last update: 2026-06-20 16:40:37 UTC


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:

  1. Publish Nepal geography JSON data
  2. Run package migrations
  3. 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:

  1. Publish Nepal geography JSON data
  2. Run migrate:fresh
  3. Recreate all tables
  4. 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