public function cdetails($id) { $employee = Employee::findOrFail($id); $prov = ['' => 'Select'] + Provinsi::lists('nama', 'id')->toArray(); $kab = ['' => 'Select'] + Kabupaten::lists('nama', 'id')->toArray(); $kec = ['' => 'Select'] + Kecamatan::lists('nama', 'id')->toArray(); $kel = ['' => 'Select'] + Kelurahan::lists('nama', 'id')->toArray(); return view('backend.employees.cdetails', compact('employee', 'prov', 'kab', 'kec', 'kel')); }
public function edit($id) { $kabupatens = Kabupaten::lists('nama_kabupaten', 'id_kabupaten'); $kecamatan = DB::table('kecamatan')->where('id_kecamatan', $id)->first(); return view('admin.data_kecamatan.edit', compact('kecamatan', 'kabupatens')); }