/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $sub_cat = CategorySub::find($id); $pict = Pict::where('id_category_subs', $id)->get(); $check = $sub_cat->publish; if ($check == 0) { $checks = ''; } else { $checks = 'checked'; } $categories = Category::all(); return view('dropmin/category_sub/edit')->with(array('sub_cat' => $sub_cat, 'check' => $checks, 'categories' => $categories, 'pict' => $pict)); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $category = Category::find($id); $pict = Pict::where('id_categories', $id)->get(); $check = $category->publish; if ($check == 0) { $checks = ''; } else { $checks = 'checked'; } return view('dropmin/category/edit')->with(array('category' => $category, 'check' => $checks, 'pict' => $pict)); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $product = Product::find($id); $sub_cat = CategorySub::all(); $variant = ProductVariant::where('id_products', $id)->get(); $pict = Pict::where('id_products', $id)->get(); $check = $product->publish; if ($check == 0) { $checks = ''; } else { $checks = 'checked'; } $categories = Category::all(); return view('dropmin/product/edit')->with(array('product' => $product, 'sub_cat' => $sub_cat, 'variant' => $variant, 'check' => $checks, 'categories' => $categories, 'pict' => $pict)); }