From 64da341fce1e0cc74e976c1e7abd2177b7a82e1c Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sat, 29 Dec 2018 14:04:08 -0500 Subject: [PATCH] convert receiptpdf --- app/Http/Controllers/PagesController.php | 2 +- app/Models/WinningBids.php | 2 +- resources/views/receiptpdf.blade.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index ff20517..f018de8 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -216,7 +216,7 @@ class PagesController extends Controller $checkout_final_results = Checkout::where('checkout_id', '=', $checkoutid) ->first(); $bidder_num = $checkout_final_results->bidder_num; - $checkout_list_results = WinningBids::with('items') + $checkout_list_results = WinningBids::with('items_rel') ->where('winning_bidder_num', '=', $bidder_num) ->get(); $checkout_info_results = DB::select("SELECT diff --git a/app/Models/WinningBids.php b/app/Models/WinningBids.php index 6cf890a..0abc95c 100644 --- a/app/Models/WinningBids.php +++ b/app/Models/WinningBids.php @@ -20,7 +20,7 @@ class WinningBids extends Model 'updated_at' ]; - public function items() + public function items_rel() { return $this->hasMany('App\Models\Items', 'iditems', 'winning_item_num'); } diff --git a/resources/views/receiptpdf.blade.php b/resources/views/receiptpdf.blade.php index 101217f..d29a293 100644 --- a/resources/views/receiptpdf.blade.php +++ b/resources/views/receiptpdf.blade.php @@ -84,10 +84,10 @@ @foreach($checkout_list_results as $checkout_list_result) - {{ $checkout_list_result->items->first()->item_assigned_num }} + {{ $checkout_list_result->items_rel->item_assigned_num }} - {{ $checkout_list_result->items->first()->item_desc }} + {{ $checkout_list_result->items_rel->item_desc }} ${{ $checkout_list_result->winning_cost }}