title: Passing option id value to controller and retrieve from another blade view via onclick
body: <p>how do i pass my two option selected id to controller via onclick and retrieved it to another blade file  </p>
  
  <p>here is my code</p>
  
  <p>option selected 1</p>
  
  <pre><code>  &lt;select name="cu" id="cu" class="input-sm form-control" onchange=""&gt;
              &lt;option value=""&gt;{{ __('messages.select') }}&lt;/option&gt;
  
               @if(!empty($custList))
                                      @foreach($custList as $cu)
                                          &lt;option value="{{ $cu-&gt;cu_customer_ID }}"&gt;{{ $cu-&gt;cu_customer_Shortname }}-{{ $cu-&gt;cu_customer_Name }}&lt;/option&gt;
                                      @endforeach
                                  @endif
  
                      &lt;/select&gt;
  </code></pre>
  
  <p>option selected 2</p>
  
  <pre><code> &lt;select name="state" id="state" class="input-sm form-control"&gt;
              &lt;option value=""&gt;{{ __('messages.select') }}&lt;/option&gt;
  
                        @if(!empty(request()-&gt;session()-&gt;get('stateList')))
                                      @foreach(request()-&gt;session()-&gt;get('stateList') as $state)
                                          &lt;option value="{{ $state-&gt;st_state_code }}"&gt;{{ $state-&gt;st_state_desc }}&lt;/option&gt;
                                      @endforeach
                                  @endif
                      &lt;/select&gt;
  </code></pre>
  
  <p>onclick which both id value passing to controller</p>
  
  <pre><code>onclick="openNewWindow('{{ route('reporting.branchCheckBoxList', ['#cu' ,'#state']) }}')"
  </code></pre>
  
  <p>web route</p>
  
  <pre><code>Route::get('reporting/branchCheckBoxList/{cuid}/{stid?}','GenReportController@branchCheckBoxList')-&gt;name('reporting.branchCheckBoxList');
  </code></pre>
  
  <p>controller </p>
  
  <pre><code> public function branchCheckBoxList($cuid, $stid = '') {
  
      $cuid = $cuid;
      $stid = $stid;
  
      return view('report.BranchCheckBoxList',  compact('cuid','stid'));
  }
  </code></pre>
  
  <p>my another blade view </p>
  
  <pre><code>&lt;script&gt;
  //how do i retrieve both selected value ??
  &lt;/script&gt;
  
  </code></pre>