示例#1
0
 public function search()
 {
     $keyword = Input::get('keyword');
     $ag = Agama::where('nama', 'LIKE', '%' . $keyword . '%')->orWhere('id', 'LIKE', '%' . $keyword . '%')->orderBy('created_at', 'desc')->paginate(10);
     $data = ['location' => 'search', 'table' => $ag];
     return View::make('agama.view', $data);
 }
 public function edit($id)
 {
     $dosen = Dosen::where('nik', '=', $id)->first();
     $agamas = Agama::lists('nama', 'id');
     $matkuls = Matkul::lists('nama', 'id');
     return view('dosen.edit')->with('dosen', $dosen)->with('agamas', $agamas)->with('matkuls', $matkuls);
 }
示例#3
0
 public static function delete($id)
 {
     $agama = Agama::find($id);
     if (!is_null($agama->first())) {
         return $agama->delete();
     } else {
         return false;
     }
 }
示例#4
0
 public function addView($anak_id)
 {
     $data = ['page_title' => 'Kasus Anak 3 (KA3)', 'panel_title' => 'Form Add', 'form_url' => '/dash/formka3/add', 'form_status' => 'add', 'jenis_kasus' => JenisKasus::all(), 'tindak_lanjut' => TindakLanjut::all(), 'agama_lists' => Agama::lists('nama', 'nama'), 'anak' => Anak::find($anak_id), 'form' => Anak::find($anak_id)->form->first(), 'user' => UserDAO::jsonAllOperator()];
     return View::make('formka3.form', $data);
 }
示例#5
0
 public function updateView($id)
 {
     $rec = Form::find($id);
     $anak = $rec->anak->first();
     $pelapor = $anak->pelapor->first();
     $data = ['page_title' => 'Kasus Anak 1 (KA1)', 'panel_title' => 'Form Edit', 'form_url' => '/dash/formka1/update', 'form_status' => 'edit', 'location_pelapor' => LocationHelper::location($pelapor->desa->id), 'location_anak' => LocationHelper::location($anak->desa->id), 'agama_lists' => Agama::lists('nama', 'nama'), 'record' => Form::find($id)];
     return View::make('formka1.form', $data);
 }
示例#6
0
 public function addView($anak_id)
 {
     $data = ['page_title' => 'Kasus Anak 6 (KA6)', 'panel_title' => 'Form Add', 'form_url' => '/dash/formka6/add', 'form_status' => 'add', 'jenis_kasus' => JenisKasus::all(), 'intervensi' => Intervensi::all(), 'agama_lists' => Agama::lists('nama', 'nama'), 'anak' => Anak::find($anak_id), 'form' => Anak::find($anak_id)->form->first()];
     return View::make('formka6.form', $data);
 }
示例#7
0
 public function updateView($id)
 {
     $anak = Anak::find($id);
     $data = ['page_title' => 'Anak', 'panel_title' => 'Form Edit', 'form_url' => '/dash/anak/update', 'form_status' => 'edit', 'location_anak' => LocationHelper::location($anak->desa->id), 'agama_lists' => Agama::lists('nama', 'nama'), 'record' => Form::find($id)];
     return View::make('anak.form', $data);
 }
示例#8
0
 public function updateView($id)
 {
     $rec = Form::find($id);
     $anak = $rec->anak->first();
     $data = ['panel_title' => 'Form Edit', 'form_url' => '/dash/formka4/update', 'form_status' => 'edit', 'record' => Form::find($id), 'jenis_kasus' => JenisKasus::all(), 'tindak_lanjut' => TindakLanjut::all(), 'agama_lists' => Agama::lists('nama', 'nama'), 'anak' => $anak, 'location_anak' => LocationHelper::location($anak->desa->id), 'location_ayah' => LocationHelper::location(), 'location_ibu' => LocationHelper::location()];
     $data = array_merge($data, $this->basic);
     return View::make('formka4.form', $data);
 }
示例#9
0
 public function updateView($id)
 {
     $form = Form::find($id);
     $anak = $form->anak->first();
     $sumber = $anak->sumber_informasi->first();
     $data = ['page_title' => 'Kasus Anak 2 (KA2)', 'panel_title' => 'Form Edit', 'form_url' => '/dash/formka2/update', 'form_status' => 'edit', 'location_anak' => LocationHelper::location($anak->desa->id), 'agama_lists' => Agama::lists('nama', 'nama'), 'record' => Form::find($id)];
     return View::make('formka2.form', $data);
 }