title: How to generate dynamic Laravel Nova select field?
body: <p>I'm trying to create a dynamic Laravel Nova select field but am having some issues.</p>
  
  <p>I have an array in my config file that I am trying to use to generate these values. Here is my code:</p>
  
  <pre><code>Select::make('Options')-&gt;options(function () {
      $options = config('options.options');
      $optionsArray = [];
      foreach($options as $index =&gt; $option) {
          $optionsArray[$index] = $option;
      }
      return [
          $optionsArray
      ];
  }),
  </code></pre>
  
  <p>But, this does not seem to work. The <code>$optionsArray</code> is populated with all of the values that I want, but the select field has no options in Nova on the front end. How can I make this work?</p>