/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id) { $validation = Validate::TipoproductoValidation(Input::all()); if ($validation->fails()) { return Redirect::to('tipoproducto/create')->withErrors($validation)->withInput(); } else { $tipoproducto = ProductType::find($id); $tipoproducto->type = Input::get('type'); $tipoproducto->save(); return Redirect::to('tipoproducto'); } }