app/Http/Controllers/ProductController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\SanPham  $sanPham
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit($id)
    {
        $data = SanPham::find($id);
        $data_array[0] = ThuongHieu::all();
        $data_array[1] = DanhMuc::all();
        $data_array[2] = KhoiLuong::all();
        return view('admin.product.edit',['biendata'=>$data],['biendata_array'=>$data_array]);
    }
public function edit ( $ id ) { $ data = SanPham :: find ( $ id ) ; $ data_array [ 0 ] = ThuongHieu :: all ( ) ; $ data_array [ 1 ] = DanhMuc :: all ( ) ; $ data_array [ 2 ] = KhoiLuong :: all ( ) ; return view ( 'admin.product.edit' , [ 'biendata' => $ data ] , [ 'biendata_array' => $ data_array ] ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .
//  Model //