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.0(1mo ago)0318MITPHPPHP ^8.2CI passing

Since Oct 17Pushed 1mo agoCompare

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

READMEChangelog (7)Dependencies (16)Versions (10)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

44

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Every ~26 days

Recently: every ~3 days

Total

7

Last Release

52d ago

Major Versions

v0.0.6 → v1.0.02026-03-26

### Community

Maintainers

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

---

Top Contributors

[![dominosaurs](https://avatars.githubusercontent.com/u/19289785?v=4)](https://github.com/dominosaurs "dominosaurs (53 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

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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