diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 97f67f7..4d6f702 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -143,15 +143,10 @@ class PagesController extends Controller public function checkoutCompleteList() { - $checkout_complete_results = DB::select("SELECT - checkout.*, - bidders.* - FROM checkout - INNER JOIN bidders AS bidders - ON checkout.bidder_num=bidders.idbidders - GROUP BY checkout.bidder_num - ORDER BY bidders.bidder_assigned_number ASC - "); + $checkout_complete_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders') + ->groupBy('bidder_num') + ->orderBy('bidders.bider_assigned_number', 'asc') + ->get(); return view('checkout_complete_list', ['checkout_complete_results' => $checkout_complete_results]); }