contract deletion

This commit is contained in:
2019-05-02 23:12:52 -05:00
parent 26bef792a7
commit e0c985a3b6

View File

@@ -88,6 +88,8 @@ class ContractAdminController extends Controller
'contract_id',
]);
dd($request->contract_id);
Contract::where(['contract_id' => $request->contract_id])->delete();
Bid::where(['contract_id' => $request->contract_id])->delete();
@@ -97,7 +99,7 @@ class ContractAdminController extends Controller
public function displayEndContract($id) {
//Gather the information for the contract, and all bids on the contract
$contract = Contract::where(['id' => $id])->first()->toArray();
$contract = Contract::where(['contract_id' => $id])->first()->toArray();
$bids = Bid::where(['contract_id' => $id])-get()->toArray();
return view('contracts.admin.endcontract')->with('contract', $contract)