定制 terloquent/id 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

terloquent/id

最新稳定版本:v0.0.1

Composer 安装命令:

composer require terloquent/id

包简介

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

README 文档

README

License: MIT Packagist Version

Eloquent models for Indonesian administrative regions — no database required.

Powered by Sushi, Terloquent ID lets you query provinces, regencies/cities, districts, and villages instantly — without any migrations or seeders.

✨ 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 sensasi-delight/id-administrative-divisions

🚀 Installation

composer require terloquent/id

Requires the pdo_sqlite PHP extension.

Start using it right away:

use TerloquentID\Regency;

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

No setup. No migrations. No database.

🧩 Data Source

The administrative data is sourced from the open dataset repository: 👉 sensasi-delight/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 sensasi-delight/id-administrative-divisions.

⚙️ Under the Hood

  • Built on Sushi, which loads CSV data into an in-memory SQLite cache.
  • Relationships mirror the Indonesian hierarchy: Province → Regency → District → Village

🛠️ Artisan Commands

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

Command Description
php artisan terloquent:status 📊 Show the current status of the administrative data (path, last update, commit info, etc.)
php artisan terloquent:clear 🧹 Clear all locally stored data and cache.

👥 Perfect For

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

❤️ Acknowledgements

Made with ❤️ by 🍕 sensasi-delight

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-16