title: Dropdown year list in Laravel not displaying
body: <p>I want to generate a dropdown list that displays years and so far, here's what I've done. I created a method in my controller below.</p>
  
  <pre class="lang-php prettyprint-override"><code>namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Support\Carbon;
  use Illuminate\Support\Facades\Log;
  
  class RUMSModel extends Model
  {
      protected $primaryKey = 'id';
      protected $fillable = [];
      protected $dateFields = [];
      protected $dropdownFields = [];
  
      public $module_dir = '';
      public $module = '';
      public $importFields = [];
  
      public static $months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  
      public function selectYear($name, $startYear, $endYear, $selected = null, $options = array())
      {
          $years = range($startYear, $endYear);
          $years = array_combine($years, $years); // [2013 =&gt; 2013]
  
          return $this-&gt;select($name, $years, $selected, $options);
      }
  ?&gt;
  </code></pre>
  
  <p>Use it to display in a Blade template:</p>
  
  <pre><code>&lt;div class="col-lg-6"&gt;
    &lt;div class="form-group"&gt;
       &lt;label for="validation-latest_estimate_year"&gt;&lt;b&gt;Latest Estimate Year:&lt;/b&gt;&lt;/label&gt;
        &lt;select id="validation-latest_estimate_year" class="form-control" name="latest_estimate_year"&gt;
        &lt;option value=""&gt;-Select Year-&lt;/option&gt;
           @foreach($model-&gt;selectYear('year') as $year)
             &lt;option value="{{$year}}" {{$year == $model-&gt;latest_estimate_year ? 'selected': ''}}&gt;{{$year}}&lt;/option&gt;
           @endforeach
        &lt;/select&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, the dropdown list doesn't display the years. I'm trying to figure out why but I ran out of ideas. Any guidance from the experts would help.</p>