/** * Show the form for editing the specified resource. * * @param \App\Product $product * @return \Illuminate\Http\Response */ public function edit(Product $product) { $productVariants = Product_variant::where('product_id', $product->product_id)->get(); $languages = Language::orderBy('order', 'asc')->get(); $categories = Category::all(); $discounts = Discount::all(); $taxes = Tax::all(); return view('intothesource.webshop.products.edit', compact('product', 'productVariants', 'languages', 'categories', 'discounts', 'taxes')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { return $id; return Product_variant::destroy($id) ? response()->json(['success' => true]) : response()->json(['success' => false], 422); }