title: How to properly have a autocomplete search input with multiple filters?
body: <p>I have a context where there is a conferences table that stores the conferences. The conference table has a column "name" and also a column city".</p>
  
  <p>I have an input type text and the user should be able to search for conference names but also for conferences that will happen in a specific city.</p>
  
  <p>To explain better: The user enters "Ne" in the input text. So it should appear the results relative to conference names but also city names. If the user clicks in the name of a conference he should be redirected to the conference details page. If he clicks in a city should appear the conferences that have the clicked city as a value in the column "city" of the conferences table.</p>
  
  <p><a href="https://i.stack.imgur.com/DY243.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DY243.png" alt="enter image description here"></a></p>
  
  <p>Do you know how this can be achieved? For now, is just working the part of appearing the conferences in the input search.</p>
  
  <p>I created an AutocompleteController for this context:</p>
  
  <pre><code>class AutocompleteController extends Controller
  {
  
      public function search(Request $request){
          $search = $request-&gt;term;
          $conferences = Conference::where('name', 'LIKE', '%'.$search.'%')-&gt;get();
  
          $data= [];
          foreach ($conferences as $key =&gt; $value){
              $data[] = ['id'=&gt; $value-&gt;id, 'value' =&gt; $value-&gt;name . " " . $value-&gt;name];
          }
          return response($data);
      }
  }
  </code></pre>
  
  <p><strong>Route to above method:</strong></p>
  
  <pre><code>Route::get('/autocomplete-search', 'AutocompleteController@search');
  </code></pre>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$("#search").autocomplete({
     source: "{{ URL::to('autocomplete-search') }}",
     minLength: 2,
     select:function(key, value)
     {
         console.log(value);
     }
  });
  </code></pre>
  
  <p><strong>Search input:</strong></p>
  
  <pre><code>&lt;div class="col col-md-6"&gt;
      &lt;h4 class="text-white  text-center font-weight-bold"&gt;Search&lt;/h4&gt;
      &lt;form class="main-search"&gt;
          &lt;input type="text" id="search" class="autocomplete dropdown-toggle" placeholder="Conference, Citiy, Category"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Conferences table:</p>
  
  <pre><code>   conferences table
  
      id | name | city | ...
  
       1 |  New conference 1  | Newcastle
       2 |  New conference 2  | Newcastle
       3 |  old conference 1  | Bristol
       4 |  old conference 2  | Glasgow
  </code></pre>