code: public function search($params)
      {
          $query = $this->find();
          
          $query->joinWith([/*,blogcatpos,categories*/]);
  
          $dataProvider = new ActiveDataProvider([
              'query' => $query,
          ]);
                          
          /* uncomment to sort by relations table on respective column
  		$dataProvider->sort->attributes['blogcatposId'] = [			
  			'asc' => ['{{%blogcatpos}}.id' => SORT_ASC],
  			'desc' => ['{{%blogcatpos}}.id' => SORT_DESC],
  		];		
  		$dataProvider->sort->attributes['categoriesId'] = [			
  			'asc' => ['{{%categories}}.id' => SORT_ASC],
  			'desc' => ['{{%categories}}.id' => SORT_DESC],
  		];*/
  
          if (!($this->load($params) && $this->validate())) {
              return $dataProvider;
          }				
  		
          $params = self::queryNumber([['id',$this->tableName()],['parent_id'],['status'],['isdel']/*['id','{{%blogcatpos}}'],['id','{{%parent}}'],['id','{{%categories}}']*/]);
  		foreach ($params as $p)
  		{
  			$query->andFilterWhere($p);
  		}
          $params = self::queryString([['title'],['description'],['image']/*['id','{{%blogcatpos}}'],['id','{{%parent}}'],['id','{{%categories}}']*/]);
  		foreach ($params as $p)
  		{
  			$query->andFilterWhere($p);
  		}
          return $dataProvider;
      }
docs: Creates data provider instance with search query applied
  
  @param array $params
  
  @return ActiveDataProvider