App\Http\Controllers\ProductsGroupController::edit PHP Method

edit() public method

Show the form for editing the specified resource.
public edit ( integer $id ) : Response
$id integer
return Response
    public function edit($id)
    {
        $product = Product::select('id', 'products_group', 'name')->with(['group' => function ($query) {
            $query->select('id', 'products_group', 'features', 'name', 'price');
        }])->find($id);
        return view('products.groups.index', compact('product'));
    }
ProductsGroupController