Convert controller

This commit is contained in:
Russ Long 2018-12-23 09:49:43 -05:00
parent e27c35a691
commit 06a020be74

View File

@ -7,24 +7,19 @@ use Illuminate\Support\Facades\DB;
use View; use View;
Use App\helpers; Use App\helpers;
use PDF; 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 class PagesController extends Controller
{ {
public function home() public function home()
{ {
$item_count_result = DB::select("SELECT $item_count_result = Items::count();
count(items.item_assigned_num) AS item_count $bidder_count_result = Bidders::count();
FROM items $winner_count_result = WinningBids::count();
");
$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
");
return view('home', ['item_count_result' => $item_count_result, 'bidder_count_result' => $bidder_count_result, 'winner_count_result' => $winner_count_result]); 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); //dd($checkout_final_results);
$checkout_data = [ $checkout_data = [
'checkout_final_results' => $checkout_final_results, 'checkout_final_results' => $checkout_final_results,
'checkout_list_results' => $checkout_list_results, 'checkout_list_results' => $checkout_list_results,
'checkout_info_results' => $checkout_info_results 'checkout_info_results' => $checkout_info_results
]; ];
// dd($checkout_data); // dd($checkout_data);