$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([ 'job_id' => $this->job_id, 'date_start' => $this->date_start, 'date_end' => $this->date_end, 'user_id' => $this->user_id, 'total_count' => $this->total_count, 'complete_count' => $this->complete_count, 'current' => $this->current, ]); $query->andFilterWhere(['like', 'name', $this->name]) ->andFilterWhere(['like', 'link', $this->link]) ->andFilterWhere(['like', 'position', $this->position]); return $dataProvider; } }