silent-auction/app/Helpers/CheckoutBidderSelectList.php
2018-12-23 10:41:29 -05:00

31 lines
1.1 KiB
PHP

<?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) {
$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>';
}
return $checkout_bidder_num;
}
}