/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $product = Product::findOrFail($id); $endChildCategories = Category::getAllEndChildrenCategory(); return view('admin.products.edit', compact('product', 'endChildCategories')); }