title: how to route a button in laravel 5.7
body: <p>How can I pass a parameter in URL, like <code>type=Wedding</code>, then query DB accordingly and pass it to a view in laravel?</p>
  
  <pre><code>&lt;div class="row row-bottom-padded-md"&gt;    
    &lt;div align="center"&gt;
      &lt;button class="btn btn-default filter-button" data-filter="all"&gt;All&lt;/button&gt;
      &lt;button class="btn btn-default filter-button" data-filter="pre_wedding"&gt;Pre-Wedding&lt;/button&gt;
      &lt;button class="btn btn-default filter-button" data-filter="holud"&gt;Holud&lt;/button&gt;
      &lt;button class="btn btn-default filter-button" data-filter="wedding"&gt;Wedding&lt;/button&gt;
      &lt;button class="btn btn-default filter-button" data-filter="reception"&gt;Reception&lt;/button&gt;
      &lt;button class="btn btn-default filter-button" data-filter="post_wedding"&gt;Post Wedding&lt;/button&gt;
    &lt;/div&gt;
    &lt;br/&gt;
  
    @forelse($gallerypictures as $gallerypicture)
    &lt;div class="gallery_product col-lg-4 col-md-4 col-sm-4 col-xs-6 filter"&gt;
      &lt;div class="products"&gt;
        &lt;img src="{{url('images',$gallerypicture-&gt;image)}}"&gt;
        &lt;div class="overlays"&gt;
          &lt;div class="text_color"&gt;Hello World&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    @empty
    &lt;h3&gt;No Photos&lt;/h3&gt;
    @endforelse    
  &lt;/div&gt;
  </code></pre>
  
  <p>The code works well when I search <code>http://127.0.0.1:8000/gallery/wedding</code>. But I want to show products category when I click the button. How can I solve it?</p>