silent-auction/app/Helpers/ItemSelectList.php

21 lines
632 B
PHP
Raw 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\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;
}
}