title: Adding input query to route value for search function Laravel Scout
body: <p>Trying to set up basic search functionality for products. I am having trouble sorting the route parameter variable and passing the query string to the search function. </p>
  
  <pre><code>Route::get('/search/{query?}', 'ProductController@searchable');
  </code></pre>
  
  <p>This works and returns a query when I input the query manually.</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function searchable($query)
  {
      // search database, with result, list on page, with links to products,
      $products = Product::search($query)-&gt;get();
  
      return view('search.index', compact('products'));
  }
  </code></pre>
  
  <p>However, I would like it to come from the URL <code>/search?test</code>.</p>
  
  <p>My form shows: </p>
  
  <pre><code>{{ Form::open(array('action' =&gt; 'ProductController@searchable', 'method' =&gt; 'get', 'files' =&gt; 'false')) }}
  &lt;input type="search" name="search" placeholder="type keyword(s) here" /&gt;
  &lt;button type="submit" class="btn btn-primary"&gt;Search&lt;/button&gt;
  {{ Form::close() }}`
  </code></pre>
  
  <p>I am new to Laravel and need a little help. I am using Laravel Scout and TNTSearch. </p>