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