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