public function search($params)
{
$query = City::find()->active()->joinWith('translations');
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
if (!($this->load($params) && $this->validate())) {
return $dataProvider;
}
if($this->word){
$query->andFilterWhere([
'or',
['like', 'courses_cat_lang.title', $this->word],
]);
}
return $dataProvider;
}