Convert controller
This commit is contained in:
parent
e27c35a691
commit
06a020be74
@ -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]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user