public function postRegisterInstansi(RegisterInstansiRequest $request) { $i = new Instansi(); $i->nama = $request->get('nama'); $i->alamat = $request->get('alamat'); $i->no_telp = $request->get('no_telp'); $i->kota_id = $request->get('kota'); $i->save(); return redirect(''); }
public function getListByInstansi($kid, $id = 0) { $instansi = Instansi::find($id); $kelas = Kelas::find($kid); $response = []; $response['output'] = ''; $guru = []; if ($instansi) { $guru = $instansi->guru; } $data = ['instansi' => $instansi, 'kelas' => $kelas, 'num' => 1, 'guru' => $guru ?: []]; $response['output'] = view('backend.partials.master.kelas.parlist', $data)->render(); return response()->json($response); }
public function getDelete($id) { $data = ['status' => Instansi::remove($id)]; return response()->json($data); }