Convert helpers
This commit is contained in:
parent
dd6fcc95cc
commit
6e618d048a
@ -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()
|
||||
|
@ -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 = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach($checkout_bidder_num_results as $checkout_bidder_num_result){
|
||||
$checkout_bidder_num .= '<option value="' . $checkout_bidder_num_result->bidders->idbidders . '">' . $checkout_bidder_num_result->bidders->bidder_assigned_number . ' - ' . $checkout_bidder_num_result->bidders->bidder_fname . ' ' . $checkout_bidder_num_result->bidders->bidder_lname .'</option>';
|
||||
|
Loading…
Reference in New Issue
Block a user