contract blade
This commit is contained in:
@@ -26,8 +26,8 @@ class ContractController extends Controller
|
||||
/**
|
||||
* Controller function to display the bids placed on contracts
|
||||
*/
|
||||
public function displayBids($contractId) {
|
||||
$bids = Bids::where(['contract_id' => $contractId, 'character_name' => auth()->user()->getName()])->get();
|
||||
public function displayBids($id) {
|
||||
$bids = Bids::where(['contract_id' => $id, 'character_name' => auth()->user()->getName()])->get();
|
||||
|
||||
return view('contracts.bids')->with('bids', $bids);
|
||||
}
|
||||
@@ -107,12 +107,9 @@ class ContractController extends Controller
|
||||
* Controller function to display a page to allow a bid
|
||||
*
|
||||
*/
|
||||
public function displayBid(Request $request) {
|
||||
$this->validate($request, [
|
||||
'contract_id',
|
||||
]);
|
||||
public function displayNewBid($id) {
|
||||
|
||||
$contractId = $request->contract_id;
|
||||
$contractId = $id;
|
||||
|
||||
return view('contracts.enterbid')->with('contractId', $contractId);
|
||||
}
|
||||
|
||||
@@ -26,15 +26,6 @@
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
<p align="text-left">
|
||||
|
||||
</p>
|
||||
<p align="text-center">
|
||||
|
||||
</p>
|
||||
<p align="text-right">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
Type: Public
|
||||
</div>
|
||||
<div class="col-sm" align="right">
|
||||
<a href="/contracts/display/bid/{{$contract['contract_id']}}" class="btn btn-primary" role="button">Bid on Contract</a>
|
||||
<a href="/contracts/display/newbid/{{$contract['contract_id']}}" class="btn btn-primary" role="button">Bid on Contract</a>
|
||||
<!--
|
||||
{!! Form::open(['action' => 'ContractController@displayBid', 'method' => 'POST']) !!}
|
||||
{{ Form::hidden('contract_id', $contract['contract_id']) }}
|
||||
|
||||
@@ -78,8 +78,9 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
Route::get('/contracts/display/all', 'ContractController@displayContracts');
|
||||
Route::get('/contracts/display/public', 'ContractController@displayPublicContracts');
|
||||
Route::get('/contracts/display/private', 'ContractController@displayPrivateContracts');
|
||||
Route::get('/contracts/display/bid/{id}', 'ContractController@displayBid');
|
||||
Route::get('/contracts/display/newbid/{id}', 'ContractController@displayNewBid');
|
||||
Route::get('/contracts/modify/bid/{id}', 'ContractController@displayModifyBid');
|
||||
Route::get('/contracts/display/bids/{id}', 'ContractController@displayBids');
|
||||
Route::post('/contracts/modify/bid', 'ContractController@modifyBid');
|
||||
Route::post('/contracts/bids/store', 'ContractController@storeBid');
|
||||
Route::post('/contracts/bids/delete', 'ContractController@deleteBid');
|
||||
|
||||
Reference in New Issue
Block a user