<?php namespace App\Helpers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Models\Judges; class JudgesSelectList { public static function judgesShowNumbers() { $judge_results = Judges::orderBy('judge_number') ->get(); $judges = '<option disabled="disabled" selected="selected" value="0">choose...</option>'; foreach ($judge_results as $judge_result) { $judges .= '<option value="' . $judge_result->id . '">' . $judge_result->judge_number . '</option>'; } return $judges; } }