title: How to get clean GET urls for search in laravel 5.4
body: <p>Currently I'm working on a project search functionality in Laravel and stuck in to get clean GET urls <strike>without any kind of JS</strike> JS will work too</p>
  
  <p>like when I search my form redirects me to </p>
  
  <p><a href="http://jobs.localhost/search?q=hello" rel="nofollow noreferrer">http://jobs.localhost/search?q=hello</a></p>
  
  <p>but instead, I want this</p>
  
  <p><a href="http://jobs.localhost/search?q=hello" rel="nofollow noreferrer">http://jobs.localhost/search/hello</a></p>
  
  <p>My web.php is: </p>
  
  <pre><code>Route::get('search', ['as' =&gt; 'search', 'uses' =&gt; 'SearchController@search']);
  </code></pre>
  
  <p>Form is:</p>
  
  <pre><code>&lt;form class="form-inline" method="GET" action="{{ action('SearchController@search') }}" id="search-form"&gt;
      &lt;div class="col-md-5 col-sm-5 col-xs-12 nopadding"&gt;
          &lt;div class="form-group"&gt;
  
              &lt;input type="text" class="form-control" id="form-q" name="q" placeholder="Search a Job"&gt;
              &lt;i class="icon-magnifying-glass"&gt;&lt;/i&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="col-md-2 col-sm-2 col-xs-12 nopadding"&gt;
          &lt;div class="form-group form-action"&gt;
              &lt;button type="submit" class="btn btn-default btn-search-submit"&gt;Search &lt;i class="fa fa-angle-right"&gt;&lt;/i&gt; &lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Currently In controller I'm just printing the value:</p>
  
  <pre><code> public function search(Request $request)
   {
    echo $request['q'];  
   }
  </code></pre>
  
  <p>I've already checked multiple solutions of JS or POST but none works for me this is the final output I'm looking for:  <a href="http://jobs.localhost/search?q=hello" rel="nofollow noreferrer">http://jobs.localhost/search/hello</a></p>
  
  <p>Thanks. </p>