contract end

This commit is contained in:
2019-05-01 01:44:33 -05:00
parent 08448a24bb
commit 41d5a670ba

View File

@@ -105,6 +105,19 @@ class ContractAdminController extends Controller
}
public function storeEndContract(Request $request) {
$this->validate($request, [
'contract_id',
'bid_id',
]);
$contract = Contract::where(['id' => $request->contract_id])->first()->toArray();
$bid = Bid::where(['id' => $request->bid_id, 'contract_id' => $request->contract_id])->first()->toArray();
//Update the contract to mark it as finished
Contract::where(['id' => $request->contract_id])->update([
'finished' => true,
]);
//Create the accepted contract entry into the table
}
}