нужно
1 |
and ('field' = 'value' or 'field' is null) |
Реализация
1 2 3 |
->andWhere(['or', ['field' => $value], ['is', 'field', new Expression('null')]]) ->andWhere(['or', ['field' => $value], ['is', 'field', null]]); ->andWhere(['or', ['field' => $value], ['field' => null]]); |