title: Laravel - Validation save selected option
body: <p>I have a form which has some validation. When one of these errors occurs the value of an input field will be saved be using <code>{{ old('name') }}</code> in the value field of an input. But this is only for regular text input fields.</p>
  
  <p>My problem.</p>
  
  <p>How can I save the selected value of a select box using the same method? So that if the user comes across an error, Their selected option will still be selected?</p>
  
  <p>The code where the selected</p>
  
  <pre><code>&lt;select name="period_id" id="" class="form-control {{ $errors-&gt;has('period_id') ? ' is-invalid' : '' }}"&gt;
     &lt;option value=""&gt;Choose a period...&lt;/option&gt;
       @foreach($plans as $plan)
       &lt;option value="{{ $plan-&gt;id }}"&gt;
          {{ $plan-&gt;name }}
       &lt;/option&gt;
       @endforeach
  &lt;/select&gt;
  
  @if($errors-&gt;has('period_id'))
   &lt;p style="color: red;"&gt; {{ $errors-&gt;first('period_id') }}&lt;/p&gt;
  @endif
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>array:9 [▼
    "_token" =&gt; "flBWl0qRV7GnMYL0D90G"
    "name" =&gt; "Product name"
    "description" =&gt; "Descriptiobn"
    "price" =&gt; "1,000"
    "productable_type" =&gt; "App\Plan"
    "period_id" =&gt; "2"
    "periodically_price" =&gt; "25"
    "composer_package" =&gt; "asdasdsasasad"
    "thumbnail" =&gt; UploadedFile {#654 ▶}
  ]
  </code></pre>