Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menampilkan data kota berdasarkan provinsi #2

Open
ophaant opened this issue Jan 10, 2018 · 1 comment
Open

Menampilkan data kota berdasarkan provinsi #2

ophaant opened this issue Jan 10, 2018 · 1 comment

Comments

@ophaant
Copy link

ophaant commented Jan 10, 2018

Bagaimana caranya menampilkan kota pada provinsi?

@l1th1um
Copy link

l1th1um commented Feb 5, 2019

Harus buat method sendiri, misal

function getCity($prov_id) {
        $list_kota = RajaOngkir::city();
        return array_filter($list_kota, function($v, $k) use ($prov_id) { 
                                                        return ($v->province_id == $prov_id); 
                                                }, ARRAY_FILTER_USE_BOTH);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants