title: Get the array value of select box within the form
body: <p>In the case of having many products, and user can dynamically adding new dropdown box. When I click submit, I want to get the value of "category[]" within the form only. </p>
  
  <p><a href="https://i.stack.imgur.com/v1fnd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v1fnd.png" alt="Preview of the dynamic dropdown box"></a></p>
  
  <p>and this is the code:</p>
  
  <pre><code>&lt;form name="store_category" method="post" enctype="multipart/form-data" action="{{ route('admin.product.category.store') }}"&gt;
      {!!csrf_field()!!}
      {!!""; $lang = session('locale') == "" ? "zh" : session('locale'); !!}
      &lt;div class="form-group category-select-container"&gt;
          {!! Form::select("categories_$project-&gt;id[]", ${"categories_" . $lang}, null, ["class" =&gt; "input-sm"]) !!}
          &lt;a href="#" class="btn btn-xs btn-danger btn-remove-category pull-right"&gt;{{trans('string.Remove')}}&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;button type="button" class="btn btn-dark btn-add-more-category"&gt;{{trans('string.Add More')}}&lt;/button&gt;
          &lt;button type="submit" class="btn blue btn-theme-colored"&gt;{{trans('string.submit')}}&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I've tried to rename the array name to something else, but when the user dynamically adding new dropdown box, it couldn't follow the number of the project for the row. </p>
  
  <pre><code>var template = '&lt;div class="form-group category-select-container"&gt;'+
                      '{!! Form::select("categories_$project-&gt;id[]", ${"categories_" . $lang}, null, ["class" =&gt; "input-sm"]) !!}'+
                      '&lt;a href="#" class="btn btn-xs btn-danger btn-remove-category pull-right"&gt;{{trans("string.Remove")}}&lt;/a&gt;'+
                  '&lt;/div&gt;';
  $('.btn-add-more-category').on('click', function(e){
      e.preventDefault();
      $(this).before(template);
  })
  </code></pre>