An open API service indexing awesome lists of open source software.

https://github.com/buchin/indodata

Data Provinsi-Kota-Kecamatan-Kabupaten se Indonesia memakai PHP
https://github.com/buchin/indodata

Last synced: 5 months ago
JSON representation

Data Provinsi-Kota-Kecamatan-Kabupaten se Indonesia memakai PHP

Awesome Lists containing this project

README

          

# Tentang Indo Data
Database apa saja yang berhubungan dengan indonesia. Memakai Eloquent Model sehingga mendukung relationship Has Many dan Belongs to.

## Instalasi dengan Composer
```bash
composer require buchin/indodata
```
## Contoh Penggunaan
```php
use Buchin\Indodata\Province;
use Buchin\Indodata\City;
use Buchin\Indodata\District;
use Buchin\Indodata\Village;

// Initialize Capsule. Required to initialize DB connection.
$capsule = new Capsule;

// Relationship: Belongs To
// Get village
$village = Village::first();

// Get district
$district = $village->district;

// Get City
$city = $district->city;

// Get Province
$province = $city->province();

// Chainable
$province = $village->district->city->province;

```