title: Laravel query builder search by status
body: <p>In my project, the user can filter the data according to 3 criteria (declared, in progress, finished).</p>
  <p>I pass string, in the url parameters [-1,0,1], in order to obtain the active filters. the statuses are defined according to several data coming from different columns of the database, in other words the information is not stored raw in the database.</p>
  <p>How can I retrieve filtered data using Query Builder?</p>
  <pre class="lang-php prettyprint-override"><code>$ret = array_filter(explode(',',', $args), 'is_numeric');
  $declared = in_array(1, $ret);
          $progress = in_array(-1, $ret);
          finished = in_array(0, $ret);
  
   if ($declared == false &amp;&amp; $progress == false &amp;&amp; $finished == false) {
            // do the treatment for this case....
          }
  </code></pre>
  <p>If I have to deal with all the cases like that, I don't think it's very optimized.</p>
  <p>Do you have an idea?</p>