$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([ 'road_to_category_id' => $this->road_to_category_id, 'region_id' => $this->region_id, 'road_id' => $this->road_id, 'begin' => $this->begin, 'end' => $this->end, 'distance' => $this->distance, 'road_category_id' => $this->road_category_id, ]); return $dataProvider; } }