/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id, Category $category, User $user) { $product = $this->productModel->find($id); $categories = $category->lists('name', 'id'); $users = $user->lists('name', 'id'); return view('product.edit', compact('product', 'categories', 'users')); }