silent-auction/app/Helpers/WinningBidSelectList.php
2018-12-23 11:01:06 -05:00

32 lines
1.0 KiB
PHP

<?php
namespace App\Helpers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Bidders;
use App\Models\Items;
use App\Models\Checkout;
use App\Models\PaymentMethods;
use App\Models\WinningBids;
class WinningBidSelectList
{
public static function winningBidShowNumbers()
{
$winning_bid_num_results = WinningBids::join('items', 'winning_bids.winning_item_num', '=', 'items.iditems')
->orderBy('items.item_assigned_num')
->get();
$winning_bid_num = '<option disabled selected hidden value="">choose...</option>';
foreach ($winning_bid_num_results as $winning_bid_num_result) {
$winning_bid_num .= '<option value="' .
$winning_bid_num_result->idwinning_bids .
'">' .
$winning_bid_num_result->item_assigned_num .
' - ' .
$winning_bid_num_result->item_desc .
'</option>';
}
return $winning_bid_num;
}
}