Download the PHP package hifzi/wilayah-indonesia without Composer

On this page you can find all versions of the php package hifzi/wilayah-indonesia. 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 wilayah-indonesia

Wilayah Indonesia

Package Laravel untuk data wilayah administratif Indonesia (Provinsi, Kabupaten/Kota, Kecamatan, Desa) lengkap dengan Kodepos. Super cepat, ringan, dan tidak membebani database.

Keunggulan Utama


Cocok Digunakan Untuk:

Package ini dirancang khusus untuk performa tinggi dan pengambilan data cepat. Sangat cocok digunakan untuk:

Filosofi: Data Lengkap Tanpa Memaksa ORM (Model-Agnostic)

Package ini sengaja tidak menyertakan file Eloquent Model. Kami hanya menyediakan struktur tabel (Migrations) dan data lengkapnya (Seeders).

Kenapa ini menguntungkan?

  1. Nol Konflik: Tidak ada pemaksaan namespace Model (seperti Hifzi\WilayahIndonesia\Models\Village).
  2. Bebas Memilih: Anda bebas membuat Model sendiri di folder app/Models/ aplikasi Anda sesuai arsitektur bisnis Anda.
  3. Zero Overhead: Untuk kebutuhan Form dan Autocomplete, gunakan Facade IndReg yang menggunakan Cache Array murni.
  4. Fleksibel untuk ORM: Jika Anda butuh fitur relasi Eloquent (belongsTo, hasMany), cukup buat Model di aplikasi Anda yang mengarah ke tabel prefix yang Anda gunakan.

Contoh Membuat Model Sendiri di Aplikasi Anda:

Jika Anda butuh relasi ORM, buat Model di aplikasi Laravel Anda seperti ini:


Instalasi

  1. Tambahkan package ke proyek Laravel Anda via Composer:

  2. Publish Config & Migration:

  3. Jalankan Migration:

  4. Jalankan Seeder Data Wilayah:

    (Opsional) Jika Anda ingin memasukkannya ke auto-seeder bawaan Laravel, tambahkan ini di database/seeders/DatabaseSeeder.php aplikasi Anda:

Konfigurasi (Opsional)

Anda bisa mengubah pengaturan di file config/wilayah-indonesia.php atau lewat file .env:


Penggunaan

Anda bisa menggunakan Facade IndReg di Controller Anda. (Anda juga bebas mengubah namanya menggunakan use ... as Wilayah; jika diinginkan).

1. Form Alamat Bertingkat (Select2 / Dropdown)

Untuk kebutuhan form alamat bertingkat (Provinsi -> Kota -> Kecamatan -> Desa). Data di-cache per level.

2. Dapatkan Alamat Lengkap dari Kode Desa

Sesuai untuk menampilkan detail alamat dari tabel companies atau users tanpa query JOIN.

3. Pencarian Desa (Autocomplete / Select2)

Mencari desa berdasarkan Nama Desa atau Kode Pos.

Fungsi ini digunakan untuk kebutuhan autocomplete/select2 pada form alamat. Hasil pencarian menampilkan informasi ringkas agar operator dapat memilih desa yang tepat ketika terdapat nama desa yang sama di wilayah berbeda.


Terimakasih Kepada

Data database wilayah dan kodepos yang digunakan pada package ini merupakan hasil kontribusi open-source dari:


All versions of wilayah-indonesia with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.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 hifzi/wilayah-indonesia contains the following files

Loading the files please wait ...