Download the PHP package dyangalih/laravel-regions without Composer

On this page you can find all versions of the php package dyangalih/laravel-regions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-regions

Laravel Indonesian Region API

Latest Version on Packagist Laravel Version License Status

A high-performance, governed Laravel package for Indonesian regional data (Provinces, Regencies, Districts, and Villages) using 2025 BPS & Kemendagri data. Featuring a deep hierarchical REST API, global search capabilities, and optimized data ingestion.

Requirements

Features

Engineering Standards

This package was developed using an advanced AI-assisted engineering workflow to ensure production-grade stability:

Installation

Quick Start (Zero-Config)


API Documentation

All routes are prefixed with /api/region.

Hierarchical Endpoints

Used for drill-down UIs or strictly scoped data retrieval.

Method Endpoint Description
GET /provinces List all provinces
GET /provinces/{id} Get province details
GET /provinces/{pId}/regencies List regencies in a province
GET /provinces/{pId}/regencies/{rId} Get regency details
GET /provinces/{pId}/regencies/{rId}/districts List districts in a regency
GET /provinces/{pId}/regencies/{rId}/districts/{dId}/villages List villages in a district

Global Search & Detail Endpoints

Used for global search boxes, autocomplete, or direct ID lookups.

Method Endpoint Description
GET /regencies Global search regencies
GET /regencies/{id} Get regency detail globally
GET /districts Global search districts
GET /districts/{id} Get district detail globally
GET /villages Global search villages
GET /villages/{id} Get village detail globally

Example JSON Response

When requesting a village (either globally or hierarchically), you get the full parent context:


Programmatic Usage

You can interact with the regional data directly in your PHP code using the Facade or Service.

Using the Facade

The Region facade provides a clean, expressive syntax for data retrieval.

Dependency Injection

You can also inject the RegionService into your controllers or services.


Performance & Caching

The package implements an Intelligent Caching layer designed for static regional data.

Forever Caching

All detail and ID-based lookups (get*ById, get*Detail) are cached forever by default. This ensures near-zero latency for repeated requests.

Self-Healing Resilience

To prevent crashes in unstable serialization environments (e.g., PHP 8.4 drift), the package automatically detects and purges corrupted cache entries (like __PHP_Incomplete_Class), re-generating them on the fly.

Cache Invalidation

The cache is versioned (region.v{version}.*). When you update your regional data, you must increment the version to invalidate all existing cache.

Manual Flush:

Automatic Flush: The php artisan indonesia:seed command automatically triggers a cache flush upon successful completion.


Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-regions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
spatie/laravel-data Version ^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dyangalih/laravel-regions contains the following files

Loading the files please wait ...