$query, ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'id' => $this->id, 'user_id' => $this->user_id, ]); $query->andFilterWhere(['like', 'art', $this->art]) ->andFilterWhere(['like', 'dt', $this->dt]); return $dataProvider; } }