public function search($params) { $query = CustomerModel::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['id_customer' => $this->id_customer, 'update_by' => $this->update_by, 'create_by' => $this->create_by]); $query->andFilterWhere(['like', 'cd_cust', $this->cd_cust])->andFilterWhere(['like', 'nm_cust', $this->nm_cust])->andFilterWhere(['like', 'contact_name', $this->contact_name])->andFilterWhere(['like', 'contact_number', $this->contact_number])->andFilterWhere(['like', 'status', $this->status])->andFilterWhere(['like', 'update_date', $this->update_date])->andFilterWhere(['like', 'create_date', $this->create_date]); return $dataProvider; }