diff --git a/app/Http/Controllers/SaleController.php b/app/Http/Controllers/SaleController.php index a402e84..f7d00cf 100644 --- a/app/Http/Controllers/SaleController.php +++ b/app/Http/Controllers/SaleController.php @@ -77,8 +77,10 @@ public function edit($id) { $sale = Sale::find($id); $products = $sale->products; + $allProducts = Product::all(); + $selectedProducts = $sale->products; - return view('Admin.sale.edit', compact('sale', 'products')); + return view('Admin.sale.edit', compact('sale', 'products', 'allProducts', 'selectedProducts')); } public function update(Request $request, $id) diff --git a/resources/views/Admin/facture/form.blade.php b/resources/views/Admin/facture/form.blade.php index 1a07c40..31d1f10 100644 --- a/resources/views/Admin/facture/form.blade.php +++ b/resources/views/Admin/facture/form.blade.php @@ -15,7 +15,7 @@