2018-12-23 10:41:29 -05:00
|
|
|
<?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 WinningBidderSelectList
|
|
|
|
{
|
2018-12-23 11:01:06 -05:00
|
|
|
public static function winningBidderShowNumbers()
|
2018-12-23 10:41:29 -05:00
|
|
|
{
|
|
|
|
|
2018-12-23 11:01:06 -05:00
|
|
|
$winning_bidder_num_results = WinningBids::join(
|
|
|
|
'bidders',
|
|
|
|
'winning_bids.winning_bidder_num',
|
|
|
|
'=',
|
|
|
|
'bidders.idbidders'
|
|
|
|
)
|
2018-12-23 10:41:29 -05:00
|
|
|
->groupBy('winning_bidder_num')
|
|
|
|
->orderBy('bidders.bidder_assigned_number')
|
|
|
|
->get();
|
|
|
|
|
|
|
|
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
|
|
|
foreach ($winning_bidder_num_results as $winning_bidder_num_result) {
|
2018-12-23 11:01:06 -05:00
|
|
|
$winning_bidder_num .= '<option value="' .
|
|
|
|
$winning_bidder_num_result->idbidders .
|
|
|
|
'">' .
|
|
|
|
$winning_bidder_num_result->bidder_assigned_number .
|
|
|
|
' - ' .
|
|
|
|
$winning_bidder_num_result->bidder_fname .
|
|
|
|
' ' .
|
|
|
|
$winning_bidder_num_result->bidder_lname .
|
|
|
|
'</option>';
|
2018-12-23 10:41:29 -05:00
|
|
|
}
|
|
|
|
return $winning_bidder_num;
|
|
|
|
}
|
|
|
|
}
|