diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index b5e6379..83dfdd8 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -158,14 +158,13 @@ class PagesController extends Controller $winning_bid_id = $edit_win_req->winid; $winner_bidder = $edit_win_req->winnerbiddernum; $winner_cost = $edit_win_req->winnerbid; - $winner_insert = DB::table('winning_bids') - ->where('idwinning_bids', $winning_bid_id) - ->update( - [ - 'winning_bidder_num' => $winner_bidder, - 'winning_cost' => $winner_cost - ] - ); + $winner_insert = WinningBids::where('idwinning_bids', $winning_bid_id) + ->update( + [ + 'winning_bidder_num' => $winner_bidder, + 'winning_cost' => $winner_cost + ] + ); return redirect('editwinners'); } @@ -186,11 +185,8 @@ class PagesController extends Controller public function itemlist() { - $itemlist_results = DB::select("SELECT - * - FROM items - ORDER BY item_assigned_num ASC - "); + $itemlist_results = Items::orderBy('item_assigned_num', 'asc') + ->get(); return view('itemlist', ['itemlist_results' => $itemlist_results]); }