title: Query Condition in Laravel 5
body: <p>I want to display the number of data entries in each province based on the query results.</p>
  <p>Here is the query I use. But with the code like this, the output I get is only the number of data in each province that contains the conditions <code>['t_entry.etitle', 'ilike', $title]</code>.</p>
  <p>Meanwhile, the condition <code>['t_entry.edesc','ilike',$title]</code> is not executed. So the amount of data I get is small. How to handle it?</p>
  <pre><code>    public function getTotalEntryByTitle($title){
      $total = [];
  
      $province = t_data_enum::where('ekey', 'province')-&gt;orderBy('etext', 'ASC')-&gt;get();
      foreach($province as $a){
          $entrys = t_e_elem::selectRaw('t_entry.*,t_e_elem.*')
              -&gt;join('t_entry', 't_e_elem.eid', '=', 't_entry.eid')
              -&gt;join('t_e_value', 't_e_elem.fid', '=', 't_e_value.elid')
              -&gt;join('t_entry_form', 't_e_value.fid', '=', 't_entry_form.fid')
              -&gt;where([['t_e_elem.fuse', '=', 1], ['t_entry.etitle', 'ilike', $title], ['t_entry.edesc','ilike',$title]]);
          $entrys = $entrys-&gt;where('t_entry.estatus', '1');
  
          $formIdP = t_entry_form::where([['etype', 1], ['fname', 'field_province']])-&gt;first()-&gt;fid;
          $entrys = $entrys-&gt;where([['t_e_value.fid', '=', $formIdP], ['t_e_value.vvalue', '=', $a-&gt;eval],
              ['t_e_elem.fuse', '=', 1]]);
  
          $entrys = $entrys-&gt;distinct(&quot;t_entry.eid&quot;)
              -&gt;where([['t_entry.etitle','ilike',$title], ['t_entry.edesc','ilike',$title]])
              -&gt;get();
  
          array_push($total, [
              'name' =&gt; $a-&gt;etext,
              'count' =&gt; count($entrys)
          ]);
      }
  
      return $total;
  }
  </code></pre>