PHPackages                             kriyar/cambodia-geographic - 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. kriyar/cambodia-geographic

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

kriyar/cambodia-geographic
==========================

This package aim to provide a list of Cambodia provinces and its sub-region such as districts, communes, and villages.

0351PHP

Since Jul 31Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kriyar/cambodia-geographic)[ Packagist](https://packagist.org/packages/kriyar/cambodia-geographic)[ RSS](/packages/kriyar-cambodia-geographic/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/3b090c36d337195e26db05aced38328479077ccef5c08ff4531a87c1ad949a0b/68747470733a2f2f706f7365722e707567782e6f72672f6b72697961722f63616d626f6469612d67656f677261706869632f646f776e6c6f616473)](https://packagist.org/packages/kriyar/cambodia-geographic)[![License](https://camo.githubusercontent.com/d6f98c289b7fb62873ae013b32898c7fe0610ae960273de54c217f710d0104a2/68747470733a2f2f706f7365722e707567782e6f72672f6b72697961722f63616d626f6469612d67656f677261706869632f6c6963656e7365)](https://packagist.org/packages/kriyar/cambodia-geographic)[![Monthly Downloads](https://camo.githubusercontent.com/b62441a692002f733f897c069eca42f1823ad0f1226afbbcf3cbf8a68aeeb9eb/68747470733a2f2f706f7365722e707567782e6f72672f6b72697961722f63616d626f6469612d67656f677261706869632f642f6d6f6e74686c79)](https://packagist.org/packages/kriyar/cambodia-geographic)

This package aim to provide a list of Cambodia provinces and its sub-region such as districts, communes, and villages.
----------------------------------------------------------------------------------------------------------------------

[](#this-package-aim-to-provide-a-list-of-cambodia-provinces-and-its-sub-region-such-as-districts-communes-and-villages)

### A basic RESTful API for getting all the cities/provinces, district/khan, commune/sangkat, village.

[](#a-basic-restful-api-for-getting-all-the-citiesprovinces-districtkhan-communesangkat-village)

Installation
------------

[](#installation)

- Step 1: Run command

    `composer require kriyar/cambodia-geographic`
- Step 2: Add `"Kriyar\\CambodiaGeographic\\": "vendor/kriyar/cambodia-geographic/src/"` to `composer.json` under `autoload` inside Laravel root directory, then run command `composer dump-autoload`

    ```
      "autoload": {
          "psr-4": {
              "App\\": "app/",
              "Kriyar\\CambodiaGeographic\\": "vendor/kriyar/cambodia-geographic/src/"
          },
          "classmap": [
              "database/seeds",
              "database/factories"
          ]
      },
    ```
- Step 3: Add service provider in `config/app.php` under `providers` array

    ```
      'providers' => [

          .......,
          Kriyar\CambodiaGeographic\CambodiaGeographicServiceProvider::class
      ],
    ```
- Step 4: Run command to publish database and seeder

    `php artisan vendor:publish --tag=cambodia-geographic-migrations`

    `php artisan vendor:publish --tag=cambodia-geographic-seeds`
- Step 5: Add these lines in the `/database/seeds/DatabaseSeeder.php`

    ```
      $this->call('CityProvinceTableSeeder');
      $this->call('DistrictTableSeeder');
      $this->call('CommuneTableSeeder');
      $this->call('VillageTableSeeder');
    ```
- Step 6: Run this in your terminal `composer dump-autoload`, then run `php artisan migrate --seed`
- Step 7: Go to
- Enjoy!

Endpoints
---------

[](#endpoints)

- `/api/cambodia/provinces` - List all the cities/provinces
- `/api/cambodia/provinces/{province_id}` - Details of the city/province
- `/api/cambodia/districts` - List all the districs in Cambodia
- `/api/cambodia/districts/{district_id}` - Details of the district
- `/api/cambodia/provinces/{province_id}/districts` - List all the districs of the province
- `/api/cambodia/communes` - List all the communes in Cambodia
- `/api/cambodia/communes/{commune_id}` - Details of the commune
- `/api/cambodia/districts/{district_id}/communes` - List all the communes of the district
- `/api/cambodia/provinces/{province_id}/communes` - List all the commune of the province
- `/api/cambodia/villages` - List all the villages in Cambodia
- `/api/cambodia/villages/{village_id}` - Details of the village
- `/api/cambodia/communes/{commune_id}/villages` - List all the villages of the commune
- `/api/cambodia/districts/{district_id}/villages` - List all the villages of the district
- `/api/cambodia/provinces/{province_id}/villages` - List all the villages of the province

Future
------

[](#future)

- Soon, will add interface for CRUD operation to make it easy for managing data of city/province, district, commune, village.

Credits:
--------

[](#credits)

Data of cities/provinces and postal code:

-
-
-

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

DISCLAIMER
----------

[](#disclaimer)

> The data is offered FOR FREE and anybody can use at their own risk. The data is offered AS IS. While I will strive to keep this data up to date, I do not claim that this is a comprehensive listing and some data may be outdated or missing. I will not be held liable for any inaccuracies or errors found in the data. I am not responsible for final end-user utilization of this data and any damages the user might incur in its use.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6eaa74a549a67bfdeab4980c5f9437c74190726745b4ab6bbe4483aaf79fd118?d=identicon)[kriyar](/maintainers/kriyar)

---

Top Contributors

[![kriyar](https://avatars.githubusercontent.com/u/5707176?v=4)](https://github.com/kriyar "kriyar (25 commits)")

### Embed Badge

![Health badge](/badges/kriyar-cambodia-geographic/health.svg)

```
[![Health](https://phpackages.com/badges/kriyar-cambodia-geographic/health.svg)](https://phpackages.com/packages/kriyar-cambodia-geographic)
```

PHPackages © 2026

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