/** * @param \yii\db\QueryInterface $query * @param array $params * @return \yii\db\QueryInterface */ public function refine($query, $params) { $where = ['or']; $bind = []; foreach ($params as $key => $val) { $name = ":{$this->name}_{$key}"; $where[] = "{$this->columnName} LIKE {$name}"; $bind[$name] = $val . '%'; } $query->andWhere($where, $bind); return parent::refine($query, $params); }
public function refine($query, $params) { $query->match($params); return parent::refine($query, $params); }