From 6e618d048a870ae0e3f08f245b93fe16c5fc9fcc Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 23 Dec 2018 09:22:52 -0500 Subject: [PATCH] Convert helpers --- app/Models/Checkout.php | 2 +- app/helpers.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Models/Checkout.php b/app/Models/Checkout.php index a0ea86f..d97d05c 100644 --- a/app/Models/Checkout.php +++ b/app/Models/Checkout.php @@ -18,7 +18,7 @@ class Checkout extends Model public function bidders() { - return $this->belongsTo('App\Models\Bidders', 'bidder_num', 'idbidders'); + return $this->belongsTo('App\Models\Bidders', 'bidder_num', 'idbidders')->orderBy('bidder_assigned_number', 'asc'); } public function paymentMethod() diff --git a/app/helpers.php b/app/helpers.php index 585c96b..9f799ad 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -25,11 +25,8 @@ class CheckoutBidderSelectList { public static function CheckoutBidderShowNumbers() { - $checkout_bidder_num_results = Checkout::with(['bidders' => function ($q) { - $q->orderBy('bidder_assigned_number', 'asc'); - }]) + $checkout_bidder_num_results = Checkout::with('bidders') ->get(); - dd($checkout_bidder_num_results); $checkout_bidder_num = ''; foreach($checkout_bidder_num_results as $checkout_bidder_num_result){ $checkout_bidder_num .= '';