Пример #1
0
 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('');
 }
Пример #2
0
 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);
 }
Пример #3
0
 public function getDelete($id)
 {
     $data = ['status' => Instansi::remove($id)];
     return response()->json($data);
 }