Skip to content

Instantly share code, notes, and snippets.

View FranklysG's full-sized avatar
🏠
Working from home

Franklys Guimarães FranklysG

🏠
Working from home
View GitHub Profile
public function __invoke()
{
try {
$this->provinsi = collect(json_decode((new Client())->get("{$this->url}getwilayah")->getBody()->getContents(), true));
$this->requests($this->provinsi, 'kabupaten');
$this->requests($this->kabupaten, 'kecamatan');
$this->requests($this->kecamatan, 'desa');
return response($this->desa);