diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 0c0876f..3d97ed9 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -7,24 +7,19 @@ use Illuminate\Support\Facades\DB; use View; Use App\helpers; use PDF; -//use Converter; +use App\Models\Bidders; +use App\Models\Items; +use App\Models\Checkout; +use App\Models\PaymentMethods; +use App\Models\WinningBids; class PagesController extends Controller { public function home() { - $item_count_result = DB::select("SELECT - count(items.item_assigned_num) AS item_count - FROM items - "); - $bidder_count_result = DB::select("SELECT - count(bidders.bidder_assigned_number) AS bidder_count - FROM bidders - "); - $winner_count_result = DB::select("SELECT - count(winning_bids.idwinning_bids) AS winner_count - FROM winning_bids - "); + $item_count_result = Items::count(); + $bidder_count_result = Bidders::count(); + $winner_count_result = WinningBids::count(); return view('home', ['item_count_result' => $item_count_result, 'bidder_count_result' => $bidder_count_result, 'winner_count_result' => $winner_count_result]); } @@ -234,8 +229,8 @@ class PagesController extends Controller "); //dd($checkout_final_results); $checkout_data = [ - 'checkout_final_results' => $checkout_final_results, - 'checkout_list_results' => $checkout_list_results, + 'checkout_final_results' => $checkout_final_results, + 'checkout_list_results' => $checkout_list_results, 'checkout_info_results' => $checkout_info_results ]; // dd($checkout_data);