diff --git a/app/helpers.php b/app/helpers.php
index 977321f..2c9db2e 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -5,16 +5,12 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Bidders;
use App\Models\Items;
+use App\Models\Checkout;
class BidderSelectList
{
public static function BidderShowNumbers()
{
- //$bidder_num_results = DB::select("SELECT
- //*
- //FROM bidders
- //ORDER BY bidder_assigned_number
- //");
$bidder_num_results = Bidders::orderBy('bidder_assigned_number')
->get();
$bidder_num = '';
@@ -29,14 +25,9 @@ class CheckoutBidderSelectList
{
public static function CheckoutBidderShowNumbers()
{
- $checkout_bidder_num_results = DB::select("SELECT
- bidder_num, bidders.*
- FROM checkout
- INNER JOIN bidders AS bidders
- ON checkout.bidder_num=bidders.idbidders
- GROUP BY bidders.bidder_assigned_number
- ORDER BY bidders.bidder_assigned_number
- ");
+ $checkout_bidder_num_results = Checkout::with('bidders')
+ ->orderBy('bidder_assigned_number')
+ ->get();
$checkout_bidder_num = '';
foreach($checkout_bidder_num_results as $checkout_bidder_num_result){
$checkout_bidder_num .= '';