PHPackages                             terloquent/id - 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. [Database &amp; ORM](/categories/database)
4. /
5. terloquent/id

ActiveLibrary[Database &amp; ORM](/categories/database)

terloquent/id
=============

🌏 Eloquent models for Indonesian administrative regions — no database required.

v1.0.1(1mo ago)0939[2 PRs](https://github.com/zainphp/terloquent-id/pulls)MITPHPPHP ^8.2CI passing

Since Oct 17Pushed 3w agoCompare

[ Source](https://github.com/zainphp/terloquent-id)[ Packagist](https://packagist.org/packages/terloquent/id)[ Docs](https://github.com/dominosaurs/terloquent-id)[ RSS](/packages/terloquent-id/feed)WikiDiscussions main Synced today

READMEChangelog (8)Dependencies (26)Versions (15)Used By (0)

🇮🇩 Terloquent ID
================

[](#-terloquent-id)

[![Tests](https://github.com/dominosaurs/terloquent-id/actions/workflows/ci.yml/badge.svg)](https://github.com/dominosaurs/terloquent-id/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/a819f10970eb0f5bb3618e72b02aacdb40ede6a5137dcf104f84fb4bf50006f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7465726c6f7175656e742f69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/terloquent/id)[![Laravel Version](https://camo.githubusercontent.com/d4e851afe30f0cc77ff1de9d658399ed7ee31d513ae7757bb24fcc648df9c792/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d4630353334303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://packagist.org/packages/terloquent/id)[![License](https://camo.githubusercontent.com/b3bc4b7ab6e1222a8c800a291d6cbf8cd6befd4cd8b44ada76e2cce115b2c402/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7465726c6f7175656e742f69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/terloquent/id)

**Eloquent models for Indonesian administrative regions — no database required.**

Powered by [Sushi](https://github.com/calebporzio/sushi), **Terloquent ID** lets you query provinces, regencies/cities, districts, and villages instantly — without any migrations or seeders.

✨ Features
----------

[](#-features)

- 🇮🇩 Ready-to-use Indonesian administrative data: **Province**, **Regency**, **District**, **Village**
- ⚡ Works like standard Eloquent models (`where`, `first`, `whereLike`, etc.)
- 🧠 No migrations or seeding required
- 🗃️ Auto-cached via Sushi for fast performance
- 📦 Uses external CSV data from [dominosaurs/id-administrative-divisions](https://github.com/dominosaurs/id-administrative-divisions)

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

[](#-installation)

```
composer require terloquent/id
```

> Requires the [`pdo_sqlite` PHP extension](https://www.php.net/manual/en/ref.pdo-sqlite.php).

Start using it right away:

```
use TerloquentID\Regency;

$regency = Regency::whereLike('name', '%Samarinda%')->firstOrFail();
```

No setup. No migrations. No database.

🧩 Data Source
-------------

[](#-data-source)

The administrative data is sourced from the open dataset repository: 👉 [**dominosaurs/id-administrative-divisions**](https://github.com/dominosaurs/id-administrative-divisions)

This repository provides CSV files representing Indonesia’s full administrative hierarchy:

```
Province → Regency → District → Village

```

It may also include additional metadata such as:

- Official region codes (Kemendagri / BPS)
- Coordinates (latitude, longitude)
- Postal codes
- Other optional attributes

> Users cannot modify the data at runtime. To suggest updates or corrections, please open a pull request to [dominosaurs/id-administrative-divisions](https://github.com/dominosaurs/id-administrative-divisions).

⚙️ Under the Hood
-----------------

[](#️-under-the-hood)

- Built on [Sushi](https://github.com/calebporzio/sushi), which loads CSV data into an in-memory SQLite cache.
- Relationships mirror the Indonesian hierarchy: `Province → Regency → District → Village`

🛠️ Artisan Commands
-------------------

[](#️-artisan-commands)

TerloquentID provides a few handy Artisan commands to help you manage local administrative data:

CommandDescription`php artisan terloquent-id:status`📊 Show the current status of the administrative data (path, last update, commit info, etc.)`php artisan terloquent-id:clear`🧹 Clear all locally stored data and cache.👥 Perfect For
-------------

[](#-perfect-for)

- Laravel developers building Indonesia-focused applications
- Address forms, location filters, or dashboards
- Projects that need regional data without managing a database

❤️ Acknowledgements
-------------------

[](#️-acknowledgements)

- [Caleb Porzio — Sushi](https://github.com/calebporzio/sushi)
- All contributors to [dominosaurs/id-administrative-divisions](https://github.com/dominosaurs/id-administrative-divisions)

> Made with ❤️ by [🍕 dominosaurs](https://github.com/dominosaurs)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Every ~32 days

Recently: every ~19 days

Total

8

Last Release

36d ago

Major Versions

v0.0.6 → v1.0.02026-03-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e258c66ee803422a0d47f100d873089eb11ee822969e62c8d9b4a27f8f2dce?d=identicon)[zainphp](/maintainers/zainphp)

---

Top Contributors

[![dominosaurs](https://avatars.githubusercontent.com/u/19289785?v=4)](https://github.com/dominosaurs "dominosaurs (59 commits)")[![zainphp](https://avatars.githubusercontent.com/u/19289785?v=4)](https://github.com/zainphp "zainphp (59 commits)")

---

Tags

administrative-divisionseloquentindonesialaravelregionsushiterritorylaraveleloquentregionindonesiaterritorysushiadministrative-divisions

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/terloquent-id/health.svg)

```
[![Health](https://phpackages.com/badges/terloquent-id/health.svg)](https://phpackages.com/packages/terloquent-id)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M632](/packages/spatie-laravel-medialibrary)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M199](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3596.2k](/packages/baril-bonsai)

PHPackages © 2026

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