middleware('auth');
}
public function getKabupaten($id,Request $request)
{
if (!$id) {
$html = '';
} else {
$html = '';
if (Role::where('id',Auth::user()->role_id)->value('akses') == 'administrator') {
$cities = KabupatenKota::where('id_prov', $id)->get();
foreach ($cities as $city) {
if ($city) {
$html .= '';
}
else{
$html = '';
}
}
}
else{
$cities = KabupatenKota::where('id_prov', Auth::user()->province_code)->get();
foreach ($cities as $city) {
if ($city) {
$html .= '';
}
else{
$html = '';
}
}
}
}
return response()->json(['html' => $html]);
}
}