In yii2 how to combine query conditions in the query builder?

(new Query)
->select('*')
...
->andWhere(['<', 'time', new Expresion('NOW()')])
->andWhere(['<', 'rating', '5']);


whether it is possible to integrate forces Builder to something like
...
->andWhere([
 ['<', 'time', new Expresion('NOW()')],
 ['<', 'rating', '5']
]);
July 4th 19 at 23:50
1 answer
July 4th 19 at 23:52
If I'm not mistaken
->andWhere(['and',
 ['<', 'time', new Expresion('NOW()')],
 ['<', 'rating', '5']
]);

Find more questions by tags PHPWeb DevelopmentYii