public function getEdit($id) { $buyers = new Party(); $buyersAll = $buyers->getBuyersDropDown(); $products = new Product(); $finishGoods = $products->getFinishGoodsDropDown(); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $sale[0] = Sale::where('invoice_id', '=', $id)->get(); $var = $sale[0]; $saleDetails = SAleDetail::where('invoice_id', '=', $id)->get(); return view('Sales.edit', compact('buyersAll'))->with('finishGoods', $finishGoods)->with('saleDetails', $saleDetails)->with('sale', $var)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos); }