From 6310dbcb232d72c8991942a8606fda978619e2eb Mon Sep 17 00:00:00 2001 From: Russ Long Date: Mon, 24 Dec 2018 12:57:07 -0500 Subject: [PATCH] convert checkout --- app/Http/Controllers/PagesController.php | 5 +++-- resources/views/checkout.blade.php | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 793ccf9..0216bed 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -79,8 +79,9 @@ class PagesController extends Controller ->where('winning_bidder_num', $checkout_bidder) ->get(); $checkout_info_results = WinningBids::with('bidders') - ->where('winning_bidder_num', $checkout_bidder) - ->get(); + ->with('items') + ->where('winning_bidder_num', $checkout_bidder) + ->get(); $checkout_cost_result = WinningBids::where('winning_bidder_num', $checkout_bidder) ->sum('winning_cost'); return view('checkout', [ diff --git a/resources/views/checkout.blade.php b/resources/views/checkout.blade.php index 9fe1bc8..a1e6603 100644 --- a/resources/views/checkout.blade.php +++ b/resources/views/checkout.blade.php @@ -47,7 +47,7 @@ @endforeach - @if($checkout_list_results) + @if($checkout_info_results) - @foreach($checkout_list_results as $checkout_list_result) + @foreach($checkout_info_results as $checkout_info_result) @endforeach @@ -79,7 +79,7 @@
@@ -57,13 +57,13 @@ Winning Bid:
- {{ $checkout_list_result->items->item_assigned_num }} + {{ $checkout_info_result->items->item_assigned_num }} - ${{ $checkout_list_result->winning_cost }} + ${{ $checkout_info_result->winning_cost }}