$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([ 'page_id' => $this->page_id, 'date_add' => $this->date_add, 'template_id' => $this->template_id, 'image_id' => $this->image_id, 'show' => $this->show, ]); return $dataProvider; } }