nurmanhabib / kewilayahan
API Data Wilayah Provinsi, Kota/Kab, Kecamatan, Kel/Desa di Indonesia dengan data dari BPS Tahun 2013.
Installs: 210
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/nurmanhabib/kewilayahan
Requires
- illuminate/database: 5.*
- illuminate/support: 5.*
This package is auto-updated.
Last update: 2025-10-12 21:53:25 UTC
README
Install
- Instalasi dengan Composer
$ composer require nurmanhabib/kewilayahan
- Tambahkan
Nurmanhabib\Kewilayahan\KewilayahanServiceProvider::classpadaconfig/app.php'providers' => [ ... Nurmanhabib\Kewilayahan\KewilayahanServiceProvider::class, ] - Copy file
config.phpkeconfig/kewilayahan.php$ php artisan vendor:publish --provider="Nurmanhabib\Kewilayahan\KewilayahanServiceProvider"
- Create table dengan migration
$ php artisan migrate
- Insert data seeder kewilayahan
$ php artisan db:seed --class="KewilayahanSeeder"
Penggunaan
$kewilayahan = app('kewilayahan');
$kewilayahan->setQuery($request->all());
$kewilayahan->setOutput('api');
$kewilayahan->setOutput(function ($data) use ($request) {
$selected = ['selected' => 'tes'];
return array_merge($data, [$selected]);
});
return $kewilayahan->load();
License
Apache