Cleanup
This commit is contained in:
parent
cd8c610d4a
commit
c814850d3a
20
app/Helpers/BidderSelectList.php
Normal file
20
app/Helpers/BidderSelectList.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Bidders;
|
||||
|
||||
class BidderSelectList
|
||||
{
|
||||
public static function BidderShowNumbers()
|
||||
{
|
||||
$bidder_num_results = Bidders::orderBy('bidder_assigned_number')
|
||||
->get();
|
||||
$bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($bidder_num_results as $bidder_num_result) {
|
||||
$bidder_num .= '<option value="' . $bidder_num_result->idbidders . '">' . $bidder_num_result->bidder_assigned_number . ' - ' . $bidder_num_result->bidder_fname . ' ' . $bidder_num_result->bidder_lname .'</option>';
|
||||
}
|
||||
return $bidder_num;
|
||||
}
|
||||
}
|
30
app/Helpers/CheckoutBidderSelectList.php
Normal file
30
app/Helpers/CheckoutBidderSelectList.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Checkout;
|
||||
|
||||
class CheckoutBidderSelectList
|
||||
{
|
||||
public static function CheckoutBidderShowNumbers()
|
||||
{
|
||||
$checkout_bidder_num_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders')
|
||||
->orderBy('bidders.bidder_assigned_number', 'asc')
|
||||
->get();
|
||||
|
||||
$checkout_bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($checkout_bidder_num_results as $checkout_bidder_num_result) {
|
||||
$checkout_bidder_num .= '<option value="' .
|
||||
$checkout_bidder_num_result->bidders->idbidders .
|
||||
'">' .
|
||||
$checkout_bidder_num_result->bidders->bidder_assigned_number .
|
||||
' - '
|
||||
. $checkout_bidder_num_result->bidders->bidder_fname .
|
||||
' ' .
|
||||
$checkout_bidder_num_result->bidders->bidder_lname .
|
||||
'</option>';
|
||||
}
|
||||
return $checkout_bidder_num;
|
||||
}
|
||||
}
|
20
app/Helpers/ItemSelectList.php
Normal file
20
app/Helpers/ItemSelectList.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Items;
|
||||
|
||||
class ItemSelectList
|
||||
{
|
||||
public static function ItemShowNumbers()
|
||||
{
|
||||
$item_num_results = Items::orderBy('item_assigned_num')
|
||||
->get();
|
||||
$item_nums = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
|
||||
foreach ($item_num_results as $item_num_result) {
|
||||
$item_nums .= '<option value="' . $item_num_result->iditems . '">' . $item_num_result->item_assigned_num . '</option>';
|
||||
}
|
||||
return $item_nums;
|
||||
}
|
||||
}
|
24
app/Helpers/PaymentMethodSelectList.php
Normal file
24
app/Helpers/PaymentMethodSelectList.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\PaymentMethods;
|
||||
use App\Models\WinningBids;
|
||||
|
||||
class PaymentMethodSelectList
|
||||
{
|
||||
public static function PaymentShowMethods()
|
||||
{
|
||||
$payment_method_results = PaymentMethods::orderBy('pm_name')
|
||||
->get();
|
||||
$payment_methods = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
|
||||
foreach ($payment_method_results as $payment_method_result) {
|
||||
$payment_methods .= '<option value="' . $payment_method_result->pm_id . '">' . $payment_method_result->pm_name . '</option>';
|
||||
}
|
||||
return $payment_methods;
|
||||
}
|
||||
}
|
25
app/Helpers/WinningBidSelectList.php
Normal file
25
app/Helpers/WinningBidSelectList.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\PaymentMethods;
|
||||
use App\Models\WinningBids;
|
||||
|
||||
class WinningBidSelectList
|
||||
{
|
||||
public static function WinningBidShowNumbers()
|
||||
{
|
||||
$winning_bid_num_results = WinningBids::join('items', 'winning_bids.winning_item_num', '=', 'items.iditems')
|
||||
->orderBy('items.item_assigned_num')
|
||||
->get();
|
||||
$winning_bid_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($winning_bid_num_results as $winning_bid_num_result) {
|
||||
$winning_bid_num .= '<option value="' . $winning_bid_num_result->idwinning_bids . '">' . $winning_bid_num_result->item_assigned_num . ' - ' . $winning_bid_num_result->item_desc .'</option>';
|
||||
}
|
||||
return $winning_bid_num;
|
||||
}
|
||||
}
|
28
app/Helpers/WinningBidderSelectList.php
Normal file
28
app/Helpers/WinningBidderSelectList.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\PaymentMethods;
|
||||
use App\Models\WinningBids;
|
||||
|
||||
class WinningBidderSelectList
|
||||
{
|
||||
public static function WinningBidderShowNumbers()
|
||||
{
|
||||
|
||||
$winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
|
||||
->groupBy('winning_bidder_num')
|
||||
->orderBy('bidders.bidder_assigned_number')
|
||||
->get();
|
||||
|
||||
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($winning_bidder_num_results as $winning_bidder_num_result) {
|
||||
$winning_bidder_num .= '<option value="' . $winning_bidder_num_result->idbidders . '">' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname .'</option>';
|
||||
}
|
||||
return $winning_bidder_num;
|
||||
}
|
||||
}
|
@ -20,7 +20,11 @@ class PagesController extends Controller
|
||||
$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]);
|
||||
return view('home', [
|
||||
'item_count_result' => $item_count_result,
|
||||
'bidder_count_result' => $bidder_count_result,
|
||||
'winner_count_result' => $winner_count_result
|
||||
]);
|
||||
}
|
||||
|
||||
public function bidderlist()
|
||||
@ -91,7 +95,10 @@ class PagesController extends Controller
|
||||
WHERE winning_bidder_num = $checkout_bidder
|
||||
GROUP BY winning_bids.winning_bidder_num
|
||||
");
|
||||
return view('checkout', ['checkout_list_results' => $checkout_list_results, 'checkout_info_results' => $checkout_info_results]);
|
||||
return view('checkout', [
|
||||
'checkout_list_results' => $checkout_list_results,
|
||||
'checkout_info_results' => $checkout_info_results
|
||||
]);
|
||||
} else {
|
||||
$winnertotal = $checkout_req->winnertotal;
|
||||
$bidder_num = $checkout_req->checkoutbiddernum;
|
||||
@ -126,11 +133,18 @@ class PagesController extends Controller
|
||||
'cc_amount' => $cc_amount,
|
||||
]
|
||||
);
|
||||
return view('checkout_complete', ['checkout_result' => $checkout_result, 'checkout_list_results' => $checkout_list_results, 'checkout_info_results' => $checkout_info_results, 'payment_method' => $payment_method, 'check_number' => $check_number, 'cc_transaction' => $cc_transaction]);
|
||||
return view('checkout_complete', [
|
||||
'checkout_result' => $checkout_result,
|
||||
'checkout_list_results' => $checkout_list_results,
|
||||
'checkout_info_results' => $checkout_info_results,
|
||||
'payment_method' => $payment_method,
|
||||
'check_number' => $check_number,
|
||||
'cc_transaction' => $cc_transaction
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function checkout_complete_list()
|
||||
public function checkoutCompleteList()
|
||||
{
|
||||
$checkout_complete_results = DB::select("SELECT
|
||||
checkout.*,
|
||||
@ -252,7 +266,7 @@ class PagesController extends Controller
|
||||
return view('receiptpdf', $checkout_data);
|
||||
}
|
||||
|
||||
public function reprint_receipt(Request $reprint_receipt_req)
|
||||
public function reprintReceipt(Request $reprint_receipt_req)
|
||||
{
|
||||
if (!$reprint_receipt_req->reprintbiddernum) {
|
||||
return view('reprint_receipt_form');
|
||||
@ -336,7 +350,10 @@ class PagesController extends Controller
|
||||
WHERE winning_bidder_num = $winner_total_bidder
|
||||
GROUP BY winning_bids.winning_bidder_num
|
||||
");
|
||||
return view('winnertotal', ['winnertotal_list_results' => $winnertotal_list_results, 'winnertotal_info_results' => $winnertotal_info_results]);
|
||||
return view('winnertotal', [
|
||||
'winnertotal_list_results' => $winnertotal_list_results,
|
||||
'winnertotal_info_results' => $winnertotal_info_results
|
||||
]);
|
||||
}
|
||||
|
||||
public function winningbidderlist()
|
||||
|
100
app/helpers.php
100
app/helpers.php
@ -1,100 +0,0 @@
|
||||
<?php
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\PaymentMethods;
|
||||
use App\Models\WinningBids;
|
||||
|
||||
class BidderSelectList
|
||||
{
|
||||
public static function BidderShowNumbers()
|
||||
{
|
||||
$bidder_num_results = Bidders::orderBy('bidder_assigned_number')
|
||||
->get();
|
||||
$bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($bidder_num_results as $bidder_num_result) {
|
||||
$bidder_num .= '<option value="' . $bidder_num_result->idbidders . '">' . $bidder_num_result->bidder_assigned_number . ' - ' . $bidder_num_result->bidder_fname . ' ' . $bidder_num_result->bidder_lname .'</option>';
|
||||
}
|
||||
return $bidder_num;
|
||||
}
|
||||
}
|
||||
|
||||
class CheckoutBidderSelectList
|
||||
{
|
||||
public static function CheckoutBidderShowNumbers()
|
||||
{
|
||||
$checkout_bidder_num_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders')
|
||||
->orderBy('bidders.bidder_assigned_number', 'asc')
|
||||
->get();
|
||||
|
||||
$checkout_bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($checkout_bidder_num_results as $checkout_bidder_num_result) {
|
||||
$checkout_bidder_num .= '<option value="' . $checkout_bidder_num_result->bidders->idbidders . '">' . $checkout_bidder_num_result->bidders->bidder_assigned_number . ' - ' . $checkout_bidder_num_result->bidders->bidder_fname . ' ' . $checkout_bidder_num_result->bidders->bidder_lname .'</option>';
|
||||
}
|
||||
return $checkout_bidder_num;
|
||||
}
|
||||
}
|
||||
|
||||
class ItemSelectList
|
||||
{
|
||||
public static function ItemShowNumbers()
|
||||
{
|
||||
$item_num_results = Items::orderBy('item_assigned_num')
|
||||
->get();
|
||||
$item_nums = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
|
||||
foreach ($item_num_results as $item_num_result) {
|
||||
$item_nums .= '<option value="' . $item_num_result->iditems . '">' . $item_num_result->item_assigned_num . '</option>';
|
||||
}
|
||||
return $item_nums;
|
||||
}
|
||||
}
|
||||
class PaymentMethodSelectList
|
||||
{
|
||||
public static function PaymentShowMethods()
|
||||
{
|
||||
$payment_method_results = PaymentMethods::orderBy('pm_name')
|
||||
->get();
|
||||
$payment_methods = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
|
||||
foreach ($payment_method_results as $payment_method_result) {
|
||||
$payment_methods .= '<option value="' . $payment_method_result->pm_id . '">' . $payment_method_result->pm_name . '</option>';
|
||||
}
|
||||
return $payment_methods;
|
||||
}
|
||||
}
|
||||
|
||||
class WinningBidSelectList
|
||||
{
|
||||
public static function WinningBidShowNumbers()
|
||||
{
|
||||
$winning_bid_num_results = WinningBids::join('items', 'winning_bids.winning_item_num', '=', 'items.iditems')
|
||||
->orderBy('items.item_assigned_num')
|
||||
->get();
|
||||
$winning_bid_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($winning_bid_num_results as $winning_bid_num_result) {
|
||||
$winning_bid_num .= '<option value="' . $winning_bid_num_result->idwinning_bids . '">' . $winning_bid_num_result->item_assigned_num . ' - ' . $winning_bid_num_result->item_desc .'</option>';
|
||||
}
|
||||
return $winning_bid_num;
|
||||
}
|
||||
}
|
||||
|
||||
class WinningBidderSelectList
|
||||
{
|
||||
public static function WinningBidderShowNumbers()
|
||||
{
|
||||
|
||||
$winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
|
||||
->groupBy('winning_bidder_num')
|
||||
->orderBy('bidders.bidder_assigned_number')
|
||||
->get();
|
||||
|
||||
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
|
||||
foreach ($winning_bidder_num_results as $winning_bidder_num_result) {
|
||||
$winning_bidder_num .= '<option value="' . $winning_bidder_num_result->idbidders . '">' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname .'</option>';
|
||||
}
|
||||
return $winning_bidder_num;
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
</label>
|
||||
<div class=col-sm-4>
|
||||
<select name="checkoutbiddernum" id="checkoutbiddernum" required class=form-control>
|
||||
<?php echo App\WinningBidderSelectList::WinningBidderShowNumbers(); ?>
|
||||
<?php echo App\Helpers\WinningBidderSelectList::WinningBidderShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</label>
|
||||
<div class=col-sm-2>
|
||||
<select name="winid" id="winid" required class=form-control>
|
||||
<?php echo App\WinningBidSelectList::WinningBidShowNumbers(); ?>
|
||||
<?php echo App\Helpers\WinningBidSelectList::WinningBidShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,7 +25,7 @@
|
||||
</label>
|
||||
<div class=col-sm-2>
|
||||
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
|
||||
<?php echo App\BidderSelectList::BidderShowNumbers(); ?>
|
||||
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</label>
|
||||
<div class=col-sm-4>
|
||||
<select name="reprintbiddernum" id="checkoutbiddernum" required class=form-control>
|
||||
<?php echo App\CheckoutBidderSelectList::CheckoutBidderShowNumbers(); ?>
|
||||
<?php echo App\Helpers\CheckoutBidderSelectList::CheckoutBidderShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</label>
|
||||
<div class=col-sm-2>
|
||||
<select name="winneritemnum" id="winneritemnum" required class=form-control>
|
||||
<?php echo App\ItemSelectList::ItemShowNumbers(); ?>
|
||||
<?php echo App\Helpers\ItemSelectList::ItemShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -26,7 +26,7 @@
|
||||
</label>
|
||||
<div class=col-sm-2>
|
||||
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
|
||||
<?php echo App\BidderSelectList::BidderShowNumbers(); ?>
|
||||
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</label>
|
||||
<div class=col-sm-4>
|
||||
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
|
||||
<?php echo App\BidderSelectList::BidderShowNumbers(); ?>
|
||||
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@ Route::group(['middleware' => 'auth'], function() {
|
||||
Route::post('bidderlist', [ 'uses' => 'PagesController@bidderlist']);
|
||||
Route::get('checkout', [ 'uses' => 'PagesController@checkout']);
|
||||
Route::post('checkout', [ 'uses' => 'PagesController@checkout']);
|
||||
Route::get('checkout_complete_list', [ 'uses' => 'PagesController@checkout_complete_list' ]);
|
||||
Route::get('checkout_complete_list', [ 'uses' => 'PagesController@checkoutCompleteList' ]);
|
||||
Route::get('editwinners', [ 'uses' => 'PagesController@editwinners']);
|
||||
Route::post('editwinners', [ 'uses' => 'PagesController@editwinners']);
|
||||
Route::get('finaltally', [ 'uses' => 'PagesController@finaltally']);
|
||||
@ -32,8 +32,8 @@ Route::group(['middleware' => 'auth'], function() {
|
||||
Route::post('items', [ 'uses' => 'PagesController@items']);
|
||||
Route::get('itemlist', [ 'uses' => 'PagesController@itemlist']);
|
||||
Route::post('itemlist', [ 'uses' => 'PagesController@itemlist']);
|
||||
Route::get('reprint_receipt', ['uses' => 'PagesController@reprint_receipt']);
|
||||
Route::post('reprint_receipt', ['uses' => 'PagesController@reprint_receipt']);
|
||||
Route::get('reprint_receipt', ['uses' => 'PagesController@reprintReceipt']);
|
||||
Route::post('reprint_receipt', ['uses' => 'PagesController@reprintReceipt']);
|
||||
Route::get('receiptpdf', ['uses' => 'PagesController@receiptpdf'])->name('receiptpdf');
|
||||
Route::get('winners', [ 'uses' => 'PagesController@winners']);
|
||||
Route::post('winners', [ 'uses' => 'PagesController@winners']);
|
||||
|
Loading…
Reference in New Issue
Block a user