title: Yii2: How to use orWhere in andWhere
body: <p>I want create this query with yii2 search model </p>
  
  <pre><code>select * from t1 where (title = 'keyword' or content = 'keyword') AND 
                         (category_id = 10 or term_id = 10 )
  </code></pre>
  
  <p>But I don't know how to use <code>orFilterWhere</code> and <code>andFilterWhere</code>.</p>
  
  <p>My code in search model:</p>
  
  <pre><code>public function search($params) {
     $query = App::find();
  
     //...
  
     if ($this-&gt;keyword) { 
          $query-&gt;orFilterWhere(['like', 'keyword', $this-&gt;keyword])
                -&gt;orFilterWhere(['like', 'content', $this-&gt;keyword])
     }
     if ($this-&gt;cat) {
          $query-&gt;orFilterWhere(['category_id'=&gt; $this-&gt;cat])
                -&gt;orFilterWhere(['term_id'=&gt; $this-&gt;cat])
     }
  
     //...
  }
  </code></pre>
  
  <p>But it creates this query:</p>
  
  <pre><code>select * from t1 where title = 'keyword' or content = 'keyword' or 
                         category_id = 10 or term_id = 10
  </code></pre>