title: Laravel get Current URL parameters and append to new URL Request
body: <p>In my Laravel app I have created a sidebar where I have links like</p>
  
  <p><code>/buy?state=NY or /buy?area=Queens</code> to let the user select a State or Area</p>
  
  <p>I also have a form that lets Users Filter various things like rating, genre.
  When i click on the Filter button, the url changes to something like</p>
  
  <pre><code>buy?min_year=1880&amp;max_year=2019&amp;min_rating=1&amp;max_rating=10&amp;genre=horror
  </code></pre>
  
  <p>it drops the <code>?state=NY or ?area=Queens</code> from the URL</p>
  
  <p>I want to I change in the action to append the current URL parameters to the Filter string</p>
  
  <p>I have tried </p>
  
  <pre><code>$url = Request::path();
  
  if (isset($_GET["state"]) &amp;&amp; !empty($_GET['state'])) {
  $state = $_GET['state'];
  $url = $url . "&amp;state=". $state;
  
  }
  if (isset($_GET["council"]) &amp;&amp; !empty($_GET['council'])) {
  $council = $_GET['council'];
  $url = $url . "&amp;council=". $council;
  
  }
  if (isset($_GET["area"]) &amp;&amp; !empty($_GET['area'])) {
  $area = $_GET['area'];
  $url = $url . "&amp;area=". $area;
  </code></pre>
  
  <p>And then in my filter form </p>
  
  <pre><code>{{ Form::open(array('url' =&gt; $url, 'class' =&gt; 'form-inline', 'method' =&gt; 'GET')) }}
  </code></pre>
  
  <p>but this results in the form returning this string.</p>
  
  <pre><code>/buystate=NY?min_year=1880&amp;max_year=2019&amp;min_rating=1&amp;max_rating=10&amp;genre=horror
  </code></pre>
  
  <p>when I want</p>
  
  <pre><code>/buy?state=NY&amp;min_year=1880&amp;max_year=2019&amp;min_rating=1&amp;max_rating=10&amp;genre=horror
  </code></pre>