public function destroy($id) { $dosen = Dosen::where('nik', '=', $id)->first(); $dosen->delete(); return redirect()->route('dosen.index'); }
/** * Store a newly created resource in storage. * * @return Response */ public function search() { $in = Input::get('search'); if (empty($in)) { return Redirect::to('administrator/dosen')->with('msge', 'Masukkan kata kunci yang dicari !'); } else { $dosen = Dosen::where('nama_dosen', 'LIKE', '%' . $in . '%')->get(); $data = array('dosen' => $dosen); return View::make('dosen.search', $data); } }