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