public function kecamatancagarbudaya($slug) { $lokasi = Kecamatan::with('kabupaten', 'peta.kategori', 'peta.foto')->whereSlugNama($slug)->first(); return view('admin.lokasi.kecamatancagarbudaya')->withLokasi($lokasi); }
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); }