past contracts for nav bar on admin dashboard menu
This commit is contained in:
@@ -38,20 +38,7 @@ class ContractAdminController extends Controller
|
||||
}
|
||||
|
||||
public function displayPastContracts() {
|
||||
$contracts = Contract::where(['finished' => true])->where('updated_at', '>', Carbon::now()->subMonths(2))->get()->toArray();
|
||||
|
||||
//Get the accepted bid for the contract and load it into the array
|
||||
foreach($contracts as $contract) {
|
||||
//Get the accepted bid for the contract and add it to the array
|
||||
$accepted = AcceptedBid::where([
|
||||
'contract_id' => $contract['contract_id'],
|
||||
])->get();
|
||||
|
||||
$contract['accepted'] = $accepted->bid_amount;
|
||||
$contract['accepted_notes'] = $accepted->notes;
|
||||
}
|
||||
|
||||
dd($contracts);
|
||||
$contractsTemp = Contract::where(['finished' => true])->where('updated_at', '>', Carbon::now()->subMonths(2))->get();
|
||||
|
||||
return view('contracts.admin.past')->with('contracts', $contracts);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,7 @@
|
||||
End Date: {{ $contract['end_date'] }}
|
||||
</div>
|
||||
<div class="container">
|
||||
Accepted Bid Amount: {{ $contract['accepted']['bid_amount'] }}<br>
|
||||
</div>
|
||||
<div class="container">
|
||||
Accepted Bid Notes: {{ $contract['accepted']['notes'] }}
|
||||
Final Cost: {{ $contract['final_cost'] }}<br>
|
||||
</div>
|
||||
<span class="border-dark">
|
||||
<div class="container">
|
||||
|
||||
Reference in New Issue
Block a user