$query, 'sort' => [ 'defaultOrder' => ['id' => SORT_DESC] ] ]); $this->load($params); if (!$this->validate()) { $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'id' => $this->id, 'active' => $this->active, 'place_id' => $this->place_id, 'target' => $this->target ]); $query ->andFilterWhere(['like', 'title', $this->title]); return $dataProvider; } }