title: Good way to filter multiple DB columns in Laravel
body: <p>I want to filter my results agains multiple <strong>DB</strong> columns but the way I'm doing it right now doesn't seem Laravel-ish at all :) </p>
  
  <p>Is there a better way? I don't want to pile up all those <code>sql</code> statements at the end.</p>
  
  <pre><code>$data = Input::except('_token');
  
          if (isset($data['passenger_name']))
          {
              $passenger_name = $data['passenger_name'];
          } else {
              $passenger_name = '*';
          }
  
          if (isset($data['passenger_lastname']))
          {
              $passenger_lastname = $data['passenger_lastname'];
          } else {
              $passenger_lastname = '*';
          }
  
          // Run query
          $q = Reservation::where('passenger_firstname', 'LIKE', '%'. $passenger_name .'%')
                          -&gt;where('passenger_lastname', 'LIKE', '%' . $passenger_lastname .'%')
                          -&gt;get();
  
          return View::make('dashboard')-&gt;with('reservations', $q);
  </code></pre>
  
  <p><br>
  These are just two of many criteria i have to run queries against</p>