$query, 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ] ]); $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([ 'id' => $this->id, 'forum_category_id' => $this->forum_category_id, /*'status' => $this->status,*/ 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]); $query->andFilterWhere(['like', 'name', $this->name]) ->andFilterWhere(['like', 'description', $this->description]) ->andFilterWhere(['like', 'thread_by', $this->thread_by]) ->andFilterWhere(['like', 'thread_tel', $this->thread_tel]) ->andFilterWhere(['like', 'thread_email', $this->thread_email]) ->andFilterWhere(['like', 'thread_contact', $this->thread_contact]) ->andFilterWhere(['like', 'remark', $this->remark]); return $dataProvider; } }