PHPackages                             hanzoalpha/laravel-wilayah - 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. hanzoalpha/laravel-wilayah

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

hanzoalpha/laravel-wilayah
==========================

Laravel Package For Wilayah Indonesia

v1.0.2(2y ago)06[3 PRs](https://github.com/hanzo-alpha/laravel-wilayah/pulls)MITPHPPHP ^8.1|^8.2

Since Oct 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hanzo-alpha/laravel-wilayah)[ Packagist](https://packagist.org/packages/hanzoalpha/laravel-wilayah)[ Docs](https://github.com/hanzoalpha/laravel-wilayah)[ RSS](/packages/hanzoalpha-laravel-wilayah/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (14)Versions (8)Used By (0)

Laravel Package For Wilayah Indonesia
=====================================

[](#laravel-package-for-wilayah-indonesia)

[![Latest Version on Packagist](https://camo.githubusercontent.com/82728ed9e35d1a335a492812a8f327a7dfecbbb63a55a72a26002f6050f8b378/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e7a6f616c7068612f6c61726176656c2d77696c617961682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hanzoalpha/laravel-wilayah)[![GitHub Tests Action Status](https://camo.githubusercontent.com/45d4417d5269f05ac802751e5132d507f9aa1804e4acf9ade2b2472a5ed9045a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68616e7a6f2d616c7068612f6c61726176656c2d77696c617961682f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/hanzo-alpha/laravel-wilayah/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/94b88d77b71d34f720c44d61127029f24a1dc34a1c78c49dfc290c210d23bdac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68616e7a6f2d616c7068612f6c61726176656c2d77696c617961682f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/hanzo-alpha/laravel-wilayah/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/afbf24f91646fc87c1692920325f2226ece235d4ca499a87641b326dbd190ed2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616e7a6f616c7068612f6c61726176656c2d77696c617961682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hanzoalpha/laravel-wilayah)

Laravel package for Wilayah Indonesia administrative data.

This is a laravel version of wilayah indonesia which ONLY provides model, migration, seeder.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/528be17d30ad47738deeb5be705a61ba7e4639e2b03b448785e1691f266e1b11/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d77696c617961682e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-wilayah)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require hanzoalpha/laravel-wilayah
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-wilayah-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-wilayah-config"
```

This is the contents of the published config file:

```
return [
    'table_prefix' => 'ind_',

    /**
     * API Configuration.
     */
    'api' => [
        /**
         * If enabled, this will load Indonesia API.
         * - http://localhost:8000/api/wilayah/provinces
         * - http://localhost:8000/api/wilayah/cities
         * - http://localhost:8000/api/wilayah/districts
         * - http://localhost:8000/api/wilayah/villages
         */
        'enabled' => true,

        /**
         * The middleware for Indonesia API.
         */
        'middleware' => ['api'],

        /**
         * The route name for Indonesia API.
         */
        'route_name' => 'api.wilayah',

        /**
         * The route prefix for Indonesia API.
         */
        'route_prefix' => 'api/wilayah',

        /**
         * Specify which column will be displayed in the response data.
         * Only support columns from database.
         */
        'response_columns' => [
            //.
            'province' => ['code', 'name'],

            'city' => ['city_code', 'province_code', 'name'],

            'district' => ['district_code', 'city_code', 'name'],

            'village' => ['village_code', 'district_code', 'name'],

            'island' => ['province_code', 'city_code', 'island_code', 'name'],
        ],
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-wilayah-views"
```

Usage
-----

[](#usage)

```
$laravelWilayah = new HanzoAlpha\LaravelWilayah();
echo $laravelWilayah->echoPhrase('Hello, HanzoAlpha!');
```

Testing
-------

[](#testing)

```
  ./vendor/bin/pest
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Hanzo Alpha](https://github.com/hanzo-alpha)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~0 days

Total

3

Last Release

947d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21241d7ba696f52ec21862017e0a9ab01bedf242464e8dec345bae12961d66b7?d=identicon)[hanzoalpha](/maintainers/hanzoalpha)

---

Top Contributors

[![hanzo-asashi](https://avatars.githubusercontent.com/u/3368565?v=4)](https://github.com/hanzo-asashi "hanzo-asashi (20 commits)")[![hanzo-alpha](https://avatars.githubusercontent.com/u/111342797?v=4)](https://github.com/hanzo-alpha "hanzo-alpha (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelindonesiawilayahadministrative

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hanzoalpha-laravel-wilayah/health.svg)

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

###  Alternatives

[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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