where([ 'user_id' => \Yii::$app->user->id ]); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); if(!$this->validate()) { return $dataProvider; } $query->andFilterWhere([ 'like', 'LOWER(name)', mb_strtolower($this->name), ]) ->andFilterWhere([ 'like', 'LOWER(phone)', mb_strtolower($this->phone), ]); return $dataProvider; } }