Mage2\Catalog\Controllers\Admin\ProductController::edit PHP Method

edit() public method

Show the form for editing the specified resource.
public edit ( integer $id ) : Illuminate\Http\Response
$id integer
return Illuminate\Http\Response
    public function edit($id)
    {
        $product = Product::findorfail($id);
        $categories = $this->categoryHelper->getCategoryOptions();
        $websites = Website::pluck('name', 'id');
        $productAttributes = ProductAttribute::all();
        return view('admin.catalog.product.edit')->with('product', $product)->with('websites', $websites)->with('categories', $categories)->with('productAttributes', $productAttributes);
    }