public function kecamatancagarbudaya($slug)
 {
     $lokasi = Kecamatan::with('kabupaten', 'peta.kategori', 'peta.foto')->whereSlugNama($slug)->first();
     return view('admin.lokasi.kecamatancagarbudaya')->withLokasi($lokasi);
 }
Example #2
0
 public function carikecamatan($id)
 {
     $kecamatan = Kecamatan::where('kabupaten_id', $id)->get();
     $options = [];
     foreach ($kecamatan as $station) {
         $options += [$station->id => $station->nama];
     }
     return response()->json($options);
 }