From edd7c8950d5522ba3d1a462fd2d4e3c520fd03e2 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 28 Apr 2019 15:49:56 -0500 Subject: [PATCH] contract blade --- app/Http/Controllers/ContractController.php | 8 ++++++++ resources/views/contracts/publiccontracts.blade.php | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ContractController.php b/app/Http/Controllers/ContractController.php index 273b3d4aa..227ffc27b 100644 --- a/app/Http/Controllers/ContractController.php +++ b/app/Http/Controllers/ContractController.php @@ -73,10 +73,18 @@ class ContractController extends Controller //Get all of the bids for the current contract $bids = Bid::where(['contract_id' => $contract->id])->get(); //Build the data structure + $temp = [ + 'contract' => [ + 'con' => $contract, + 'bids' => $bids, + ], + ]; + /* $temp = [ 'contract' => $contract, 'bids' => $bids, ]; + */ //Push the new contract onto the stack array_push($data, $temp); diff --git a/resources/views/contracts/publiccontracts.blade.php b/resources/views/contracts/publiccontracts.blade.php index 8ebe5cc46..7638b0053 100644 --- a/resources/views/contracts/publiccontracts.blade.php +++ b/resources/views/contracts/publiccontracts.blade.php @@ -6,9 +6,10 @@
-{{ dd($data) }} @if(count($data)) - +@foreach($data as $contract) + @include('contracts.includes.public') +@endforeach
@else @include('contracts.includes.nocontracts')