contract blades
This commit is contained in:
@@ -63,7 +63,8 @@ class ContractController extends Controller
|
||||
$data = array();
|
||||
|
||||
//Fetch all of the current contracts from the database
|
||||
$contracts = Contract::where(['end_date', '>=', $today])->get();
|
||||
$contracts = Contract::where(['end_date', '>=', $today])
|
||||
->where(['type' => 'public'])->get();
|
||||
|
||||
//Check if no contracts were pulled from the database
|
||||
if($contracts != null) {
|
||||
@@ -96,11 +97,26 @@ class ContractController extends Controller
|
||||
$today = Carbon::now();
|
||||
|
||||
//Fetch all of the current contracts from the database
|
||||
$contracts = Contract::where(['end_date', '>=', $today])->get();
|
||||
$contracts = Contract::where(['end_date', '>=', $today])
|
||||
->where(['type' => 'private'])->get();
|
||||
|
||||
return view ('contracts.privatecontracts')->with('contracts', $contracts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller function to display a page to allow a bid
|
||||
*
|
||||
*/
|
||||
public function displayBid(Request $request) {
|
||||
$this->validate($request, [
|
||||
'contract_id',
|
||||
]);
|
||||
|
||||
$contractId = $request->contract_id;
|
||||
|
||||
return view('contracts.enterbid')->with('contractId', $contractId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller function to store a new bid
|
||||
*/
|
||||
@@ -140,4 +156,18 @@ class ContractController extends Controller
|
||||
|
||||
return redirect('contracts/display/public')->with('success', 'Bid deleted.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller function to display modify bid page
|
||||
*/
|
||||
public function displayModifyBid(Request $request) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller function to modify a bid
|
||||
*/
|
||||
public function modifyBid(Request $request) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user