silent-auction/app/Helpers/CheckoutBidderSelectList.php

23 lines
1019 B
PHP
Raw Normal View History

2018-12-23 10:41:29 -05:00
<?php
namespace App\Helpers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Checkout;
class CheckoutBidderSelectList
{
public static function CheckoutBidderShowNumbers()
{
$checkout_bidder_num_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders')
->orderBy('bidders.bidder_assigned_number', 'asc')
->get();
$checkout_bidder_num = '<option disabled selected hidden value="">choose...</option>';
foreach ($checkout_bidder_num_results as $checkout_bidder_num_result) {
2018-12-23 10:44:32 -05:00
$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>';
2018-12-23 10:41:29 -05:00
}
return $checkout_bidder_num;
}
}