diff --git a/app/helpers.php b/app/helpers.php
index 635c91e..92b21e6 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -85,14 +85,12 @@ class WinningBidderSelectList
{
public static function WinningBidderShowNumbers()
{
- $winning_bidder_num_results = DB::select("SELECT
- winning_bidder_num, bidders.*
- FROM winning_bids
- INNER JOIN bidders AS bidders
- ON winning_bids.winning_bidder_num=bidders.idbidders
- GROUP BY winning_bidder_num
- ORDER BY winning_bidder_num
- ");
+
+ $winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
+ ->groupBy('winning_bider_num')
+ ->orderBy('bidders.bidder_assigned_number')
+ ->get();
+
$winning_bidder_num = '';
foreach($winning_bidder_num_results as $winning_bidder_num_result){
$winning_bidder_num .= '';