/**
  * 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');
 }
 public function update(ProductTypeUpdateRequest $request, $id)
 {
     $response = $this->repository->update($id, $request->all());
     if ($response) {
         flash()->success(trans('product_type.main_name'), trans('product_type.update_success_message'));
     } else {
         flash()->error(trans('product_type.main_name'), trans('product_type.update_success_message'));
     }
     return redirect('/product-types');
 }