PHPackages                             kodepandai/laravel-indonesia - 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. kodepandai/laravel-indonesia

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

kodepandai/laravel-indonesia
============================

Indonesia administrative data for laravel

v2.0.3(2y ago)84.2k3[1 issues](https://github.com/kodepandai/laravel-indonesia/issues)[1 PRs](https://github.com/kodepandai/laravel-indonesia/pulls)MITPHPPHP ^7.3|^8.0

Since Aug 19Pushed 2y agoCompare

[ Source](https://github.com/kodepandai/laravel-indonesia)[ Packagist](https://packagist.org/packages/kodepandai/laravel-indonesia)[ Docs](https://github.com/kodepandai/laravel-indonesia)[ RSS](/packages/kodepandai-laravel-indonesia/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (43)Used By (0)

Laravel Indonesia
=================

[](#laravel-indonesia)

Laravel package for Indonesia administrative data.

This is a lightweight version of [laravolt/indonesia](https://github.com/laravel/indonesia)which **ONLY** provides model, migration, seeder and a simple API endpoint.

Comparison
----------

[](#comparison)

featurekodepandai/laravel-indonesialaravolt/indonesiainstalled size1.6 MB4.6 MBraw datacompressed with gzipuncompressedapisimplecomplex, for laravoltInstallation
------------

[](#installation)

Install with composer:

```
composer require kodepandai/laravel-indonesia
```

(Optional) publish the package migration and configuration:

```
php artisan vendor:publish --provider="KodePandai\Indonesia\IndonesiaServiceProvider"

```

Configuration
-------------

[](#configuration)

Open the `config/indonesia.php` file and suits your need.

Usage
-----

[](#usage)

### Seeder

[](#seeder)

This package automatically load indonesia migration, but to seed the database you must configure it manually.

Call `IndonesiaDatabaseSeeder` in your `DatabaseSeeder`:

```
// file: database/seeders/DatabaseSeeder.php

use KodePandai\Indonesia\IndonesiaDatabaseSeeder;

//..
public function run(): void
{
    $this->call(IndonesiaDatabaseSeeder::class);
}
//..
```

### Model

[](#model)

This package has 4 base models (`Province`, `City`, `District`, `Village`) and each model has relations to other models.

```
use \KodePandai\Indonesia\Models\Province;
use \KodePandai\Indonesia\Models\City;
use \KodePandai\Indonesia\Models\District;
use \KodePandai\Indonesia\Models\Village;

$province = Province::first();
$province->cities; // get cities of the province
$province->districts; // get districts of the province
$province->villages; // get villages of the province

$city = City::first();
$city->province; // get province of the city
$city->districts; // get districts of the city
$city->villages; // get villages of the city

$district = District::first();
$district->province; // get province of the district
$district->city; // get city of the district
$district->villages; // get villages of the district

$village = Village::first();
$village->province; // get province of the village
$village->city; // get city of the village
$village->district; // get district of the village
```

### API

[](#api)

This package provides API endpoint to get administrative data. The API is enabled by default, to disable it, change the configuration file.

#### Province

[](#province)

- Get all provinces

```
$ curl "http://localhost:8000/api/indonesia/provinces"
```

\*Note: add parameter `as_html=true` to get response as html options.

#### City

[](#city)

- Get all cities

```
$ curl "http://localhost:8000/api/indonesia/cities"
```

- Get cities by province\_code or province\_name

```
$ curl "http://localhost:8000/api/indonesia/cities?province_code=33"
$ curl "http://localhost:8000/api/indonesia/cities?province_name=PAPUA"
```

\*Note: add parameter `as_html=true` to get response as html options.

#### District

[](#district)

- Get all districts

```
$ curl "http://localhost:8000/api/indonesia/districts"
```

- Get districts by city\_code or city\_name

```
$ curl "http://localhost:8000/api/indonesia/districts?city_code=3315"
$ curl "http://localhost:8000/api/indonesia/districts?city_name=KOTA SEMARANG"
```

\*Note: add parameter `as_html=true` to get response as html options.

#### Village

[](#village)

- Get all villages

```
$ curl "http://localhost:8000/api/indonesia/villages"
```

- Get villages by district\_code or district\_name

```
$ curl "http://localhost:8000/api/indonesia/villages?district_code=337401"
$ curl "http://localhost:8000/api/indonesia/villages?district_name=SEMARANG TENGAH"
```

\*Note: add parameter `as_html=true` to get response as html options.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~69 days

Recently: every ~114 days

Total

41

Last Release

771d ago

Major Versions

v0.31 → v1.0.02022-03-29

v0.32 → v1.0.22022-06-11

v0.33 → v2.0.02023-01-02

v0.34 → v2.0.12023-03-09

PHP version history (7 changes)v0.1PHP &gt;=5.5.0

v0.14PHP &gt;=7.1.3

v0.25PHP &gt;=7.2

v0.26PHP &gt;=7.2.5

v0.27PHP ^7.3

v0.28PHP ^7.3|^8.0

v1.0.0PHP ^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/58328fa344fd0959aaf080fa3c82759eae15270ac62c25a64ddc23f65f66edce?d=identicon)[lakuapik](/maintainers/lakuapik)

![](https://www.gravatar.com/avatar/8a66a3f67ded4e30bdd4b715c22827d60bf2d27c1f26979b5eb9cda8f0a9ddd6?d=identicon)[sangvictim](/maintainers/sangvictim)

![](https://www.gravatar.com/avatar/4f3970472c21f6317975c19beec9854cc8f6f1543e13c43c82ef8aa307f42f83?d=identicon)[axmad386](/maintainers/axmad386)

---

Top Contributors

[![uyab](https://avatars.githubusercontent.com/u/149716?v=4)](https://github.com/uyab "uyab (76 commits)")[![adhatama](https://avatars.githubusercontent.com/u/4653421?v=4)](https://github.com/adhatama "adhatama (27 commits)")[![lakuapik](https://avatars.githubusercontent.com/u/20186786?v=4)](https://github.com/lakuapik "lakuapik (17 commits)")[![fauzipadlaw](https://avatars.githubusercontent.com/u/15975922?v=4)](https://github.com/fauzipadlaw "fauzipadlaw (7 commits)")[![rizkyarlin](https://avatars.githubusercontent.com/u/12138606?v=4)](https://github.com/rizkyarlin "rizkyarlin (6 commits)")[![qisthidev](https://avatars.githubusercontent.com/u/34129273?v=4)](https://github.com/qisthidev "qisthidev (6 commits)")[![syofyanzuhad](https://avatars.githubusercontent.com/u/52684582?v=4)](https://github.com/syofyanzuhad "syofyanzuhad (6 commits)")[![deriramdanis](https://avatars.githubusercontent.com/u/17429321?v=4)](https://github.com/deriramdanis "deriramdanis (3 commits)")[![latamaosadi](https://avatars.githubusercontent.com/u/12993789?v=4)](https://github.com/latamaosadi "latamaosadi (2 commits)")[![nafiesl](https://avatars.githubusercontent.com/u/8721551?v=4)](https://github.com/nafiesl "nafiesl (2 commits)")[![SupianIDz](https://avatars.githubusercontent.com/u/37969970?v=4)](https://github.com/SupianIDz "SupianIDz (2 commits)")[![maulanakevinp](https://avatars.githubusercontent.com/u/44237629?v=4)](https://github.com/maulanakevinp "maulanakevinp (1 commits)")[![axmad386](https://avatars.githubusercontent.com/u/8775678?v=4)](https://github.com/axmad386 "axmad386 (1 commits)")[![nmfzone](https://avatars.githubusercontent.com/u/10361906?v=4)](https://github.com/nmfzone "nmfzone (1 commits)")[![darkcyber](https://avatars.githubusercontent.com/u/6040969?v=4)](https://github.com/darkcyber "darkcyber (1 commits)")[![ramadani](https://avatars.githubusercontent.com/u/6203406?v=4)](https://github.com/ramadani "ramadani (1 commits)")[![bpradana](https://avatars.githubusercontent.com/u/19858989?v=4)](https://github.com/bpradana "bpradana (1 commits)")[![anandiamy](https://avatars.githubusercontent.com/u/8675936?v=4)](https://github.com/anandiamy "anandiamy (1 commits)")[![fikrydev](https://avatars.githubusercontent.com/u/9731623?v=4)](https://github.com/fikrydev "fikrydev (1 commits)")[![achmadfatoni](https://avatars.githubusercontent.com/u/7721040?v=4)](https://github.com/achmadfatoni "achmadfatoni (1 commits)")

---

Tags

laravellaravel-packagelaravelindonesiaadministrative

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/kodepandai-laravel-indonesia/health.svg)

```
[![Health](https://phpackages.com/badges/kodepandai-laravel-indonesia/health.svg)](https://phpackages.com/packages/kodepandai-laravel-indonesia)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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