/** * Update the specified anggota in storage. * * @param int $id * @return Response */ public function update($id) { $anggota = Anggota::findOrFail($id); $validator = Validator::make($data = Input::all(), Anggota::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $anggota->update($data); return Redirect::route('admin.anggotas.index'); }