$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; } // grid filtering conditions $query->andFilterWhere([ 'team_id' => $this->team_id, 'user_id' => $this->user_id, 'department_id' => $this->department_id, 'date_add' => $this->date_add, 'user_add_id' => $this->user_add_id, 'experience_from' => $this->experience_from, ]); $query->andFilterWhere(['like', 'firstname', $this->firstname]) ->andFilterWhere(['like', 'lastname', $this->lastname]) ->andFilterWhere(['like', 'middlename', $this->middlename]) ->andFilterWhere(['like', 'link', $this->link]) ->andFilterWhere(['like', 'position', $this->position]) ->andFilterWhere(['like', 'photo', $this->photo]) ->andFilterWhere(['like', 'country_id', $this->country_id]); return $dataProvider; } }