<?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; } }