title: how to pass a javascript variable to laravel route?
body: <p><strong>Script code:</strong></p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
    function getValue(){
      var getvalue=document.getElementById('brand').value;
      window.location='products' +getvalue;
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>This is my script code. Here I am trying to pass the value of the variable 'getvalue'to the route.</p>
  
  <p><strong>Route:</strong></p>
  
  <pre><code>Route::get('products/{getvalue}','categoryController@bValue');
  </code></pre>
  
  <p>This is my route. Here I am trying to pass the getvalue to the controller.</p>
  
  <p><strong>Controller code:</strong></p>
  
  <pre><code>  public function bValue(Request $getvalue)
  {
  
      echo $getvalue;
  }
  </code></pre>