$query, ]); $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; } $query->andFilterWhere([ 'id_procurement' => $this->id_procurement, 'id_warehouse' => $this->id_warehouse, 'id_user' => $this->id_user, 'id_product' => $this->id_product, 'count' => $this->count, 'stock' => $this->stock, 'purchase_price' => $this->purchase_price, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]); $query->andFilterWhere(['like', 'description', $this->description]); return $dataProvider; } }