silent-auction/app/Helpers/PaymentMethodSelectList.php

29 lines
849 B
PHP
Raw Permalink Normal View History

2018-12-23 10:41:29 -05:00
<?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
{
2018-12-23 11:01:06 -05:00
public static function paymentShowMethods()
2018-12-23 10:41:29 -05:00
{
$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) {
2018-12-23 11:01:06 -05:00
$payment_methods .= '<option value="' .
$payment_method_result->pm_id .
'">' .
$payment_method_result->pm_name .
'</option>';
2018-12-23 10:41:29 -05:00
}
return $payment_methods;
}
}