public function search($params) { $query = Ticket::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'type' => $this->type, 'priority' => $this->priority, 'created_at' => $this->created_at, 'created_by' => $this->created_by, 'updated_at' => $this->updated_at, 'updated_by' => $this->updated_by, 'status' => $this->status]); $query->andFilterWhere(['like', 'title', $this->title])->andFilterWhere(['like', 'customer_fullname', $this->customer_fullname])->andFilterWhere(['like', 'customer_company', $this->customer_company])->andFilterWhere(['like', 'customer_phone', $this->customer_phone])->andFilterWhere(['like', 'customer_email', $this->customer_email])->andFilterWhere(['like', 'system', $this->system])->andFilterWhere(['like', 'detail', $this->detail])->andFilterWhere(['like', 'suggestion', $this->suggestion])->andFilterWhere(['like', 'cause', $this->cause])->andFilterWhere(['like', 'solution', $this->solution])->andFilterWhere(['like', 'site', $this->site])->andFilterWhere(['like', 'hardware_type', $this->hardware_type])->andFilterWhere(['like', 'hardware_part', $this->hardware_part])->andFilterWhere(['like', 'hardware_serial', $this->hardware_serial]); return $dataProvider; }