silent-auction/app/Helpers/ItemSelectList.php

25 lines
680 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
{
2018-12-23 11:01:06 -05:00
public static function itemShowNumbers()
2018-12-23 10:41:29 -05:00
{
$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) {
2018-12-23 11:01:06 -05:00
$item_nums .= '<option value="' .
$item_num_result->iditems .
'">' .
$item_num_result->item_assigned_num .
'</option>';
2018-12-23 10:41:29 -05:00
}
return $item_nums;
}
}