public function search($params) { $query = Payment::find(); $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['id' => SORT_DESC]]]); $this->load($params); if (!$this->validate()) { return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'order_id' => $this->order_id, 'amount' => $this->amount, 'payment_type_id' => $this->payment_type_id]); $query->andFilterWhere(['like', 'ip', $this->ip])->andFilterWhere(['like', 'description', $this->description]); return $dataProvider; }