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