diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 2a58887..ff20517 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -217,7 +217,7 @@ class PagesController extends Controller ->first(); $bidder_num = $checkout_final_results->bidder_num; $checkout_list_results = WinningBids::with('items') - ->where('winning_bidder_num', '=', '$bidder_num') + ->where('winning_bidder_num', '=', $bidder_num) ->get(); $checkout_info_results = DB::select("SELECT winning_bids.*, diff --git a/app/Models/Items.php b/app/Models/Items.php index fb7434f..f6a0f6a 100644 --- a/app/Models/Items.php +++ b/app/Models/Items.php @@ -20,9 +20,9 @@ class Items extends Model 'created_at', 'updated_at' ]; - + public function winningBids() { - return $this->belongsTo('App\Models\WinningBids', 'winning_item_num', 'iditems'); + return $this->belongsTo('App\Models\WinningBids', 'iditems', 'winning_item_num'); } }