From 273cb2b775fb01746c8911e28cccceed3e187faa Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Fri, 7 Aug 2020 14:16:56 -0500 Subject: [PATCH] supply chain controller --- app/Http/Controllers/Contracts/SupplyChainController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Contracts/SupplyChainController.php b/app/Http/Controllers/Contracts/SupplyChainController.php index 8a2195e88..b1216524a 100644 --- a/app/Http/Controllers/Contracts/SupplyChainController.php +++ b/app/Http/Controllers/Contracts/SupplyChainController.php @@ -318,8 +318,7 @@ class SupplyChainController extends Controller 'contract_id' => $request->contract_id, ])->select('bids')->get(); - //Increase the number of bids by 1 - $numBids = $num->bids + 1; + dd($num); //Update the database SupplyChainContract::where([ @@ -354,6 +353,11 @@ class SupplyChainController extends Controller 'bid_id' => $bidId, ])->delete(); + //Remove 1 from the supply chain contract total bids + $contractBids = SupplyChainContract::where([ + + ]); + return redirect('/supplychain/dashboard')->with('success', 'Deleted supply chain contract bid.'); } else { return redirect('/supplychain/dashboard')->with('error', 'No bid found to delete.');