/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(ProductTypeUpdateRequest $request, $id) { $productType = new ProductType($request->all()); ProductType::where('id', $id)->update($productType->getAttributes()); flash()->success(trans('product_type.label.name'), trans('product_type.message_alert.update_success')); return redirect('/product-types'); }