PHPackages                             phumtech/laravel-cambodia-seeder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phumtech/laravel-cambodia-seeder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phumtech/laravel-cambodia-seeder
================================

A comprehensive Cambodia geography seeder for Laravel providing Provinces, Districts, and Communes data.

v1.0.0(2mo ago)03MITPHP

Since Apr 8Pushed 1mo agoCompare

[ Source](https://github.com/phumtech/laravel-cambodia-seeder)[ Packagist](https://packagist.org/packages/phumtech/laravel-cambodia-seeder)[ RSS](/packages/phumtech-laravel-cambodia-seeder/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Cambodia Geography Seeder
=================================

[](#laravel-cambodia-geography-seeder)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4a70c2f3a56cc8a7303e6e6e5d0d5d165f6d4d2d2d373715b91028fc30e847b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068756d746563682f6c61726176656c2d63616d626f6469612d7365656465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phumtech/laravel-cambodia-seeder)[![GitHub Tests Action Status](https://camo.githubusercontent.com/426ad01cc107002fcd324808ce07207c9b98ac23af98eea709428bd974b6533d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068756d746563682f6c61726176656c2d63616d626f6469612d7365656465722f6c696e742e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/phumtech/laravel-cambodia-seeder/actions)[![Total Downloads](https://camo.githubusercontent.com/26a7a19c1e72304cb23b016192b24e49b3ff7c8446df57b2da415f28bb4b0227/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068756d746563682f6c61726176656c2d63616d626f6469612d7365656465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phumtech/laravel-cambodia-seeder)[![License](https://camo.githubusercontent.com/d8265d359fad71fcc38cdc4c01de41cf8ac49bdbd29a1c6905461fdafe099fa7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068756d746563682f6c61726176656c2d63616d626f6469612d7365656465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/phumtech/laravel-cambodia-seeder/blob/main/LICENSE)[![PHP Version Require](https://camo.githubusercontent.com/0e458ed1869c6be46c36d315504a30a773ad71f8c20cd5c0aed25faac5e494fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068756d746563682f6c61726176656c2d63616d626f6469612d7365656465722e7376673f7374796c653d666c61742d73717561726526636f6c6f723d626c7565)](https://packagist.org/packages/phumtech/laravel-cambodia-seeder)

A comprehensive, production-ready Laravel package providing a complete database of Cambodian geography. This include migrations, seeders, and fully-mapped Eloquent Models for Provinces, Districts, and Communes. Perfect for KYC, address forms, and localized applications in Cambodia.

---

🗺️ Coverage Data
----------------

[](#️-coverage-data)

This package provides the most up-to-date administrative divisions of Cambodia:

- **25 Provinces** (including Phnom Penh Municipality)
- **210 Districts** (Srok/Krong/Khan)
- **1,652 Communes** (Khum/Sangkat)
- **Bilingual Support**: All data includes names in both **English** and **Khmer**.

---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require phumtech/laravel-cambodia-seeder
```

The package supports PHP **7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5**.

The package will automatically register its service provider.

---

🛠️ Setup &amp; Seeding
----------------------

[](#️-setup--seeding)

### 1. Run Migrations

[](#1-run-migrations)

Create the `provinces`, `districts`, and `communes` tables:

```
php artisan migrate
```

### 2. Seed the Database

[](#2-seed-the-database)

Populate the tables with the Cambodian geography data:

```
php artisan cambodia:seed
```

---

📖 Usage
-------

[](#-usage)

This package provides ready-to-use Eloquent Models with pre-defined relationships.

### The Models

[](#the-models)

- `Phumtech\CambodiaSeeder\Models\Province`
- `Phumtech\CambodiaSeeder\Models\District`
- `Phumtech\CambodiaSeeder\Models\Commune`

### Example: Fetching Geography Data

[](#example-fetching-geography-data)

```
use Phumtech\CambodiaSeeder\Models\Province;

// Get all provinces with their districts and communes
$provinces = Province::with('districts.communes')->get();

// Find a specific province by English name
$siemReap = Province::where('name_en', 'Siemreap')->first();

echo "Province: " . $siemReap->name_kh; // សៀមរាប

foreach ($siemReap->districts as $district) {
    echo "District: " . $district->name_en;
}
```

---

⚙️ Customization
----------------

[](#️-customization)

If you need to modify the raw datasets before seeding, you can publish the CSV files:

```
php artisan vendor:publish --tag=cambodia-data
```

The CSV data will be available in your application's `database/data/cambodia` directory. Running the seed command will prioritize these local files if they exist.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

🛡️ Security
-----------

[](#️-security)

If you discover any security-related issues, please email  instead of using the issue tracker.

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

---

### SEO Keywords

[](#seo-keywords)

Cambodia geography, Laravel provinces seeder, Cambodia districts database, Khmer address database, Cambodia administrative divisions, Phumtech, Laravel Cambodia geography, Cambodia cities list.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance88

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

62d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cbc61c357caa3f8053d5102cc425ead43770227b7071ffe58d0c30e9caf5918?d=identicon)[MengDev](/maintainers/MengDev)

---

Top Contributors

[![phumtech](https://avatars.githubusercontent.com/u/274576137?v=4)](https://github.com/phumtech "phumtech (3 commits)")

### Embed Badge

![Health badge](/badges/phumtech-laravel-cambodia-seeder/health.svg)

```
[![Health](https://phpackages.com/badges/phumtech-laravel-cambodia-seeder/health.svg)](https://phpackages.com/packages/phumtech-laravel-cambodia-seeder)
```

###  Alternatives

[cheprasov/php-parallel

The class allows you to run multiple operations parallel in different processes and send results to the main process. Useful if you need to run multiple independent operations simultaneously, instead of sequential execution, or if you run several independent queries, for example, queries to different data bases

1712.5k5](/packages/cheprasov-php-parallel)[divante-ltd/pimcore5-clipboard

Clipboard Bundle for Pimcore 5. Adding objects to the special clipboard give you possibility to make actions only on some marked by you objects.

101.6k](/packages/divante-ltd-pimcore5-clipboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
