/var/www/vhosts/nabawater/backend/models
Edit: /var/www/vhosts/nabawater/backend/models/CountrySearch.php (1554B)
alias('C')
->select('C.*')
->where(['<>', 'C.country_status', Country::DELETE]);
Country::selectTranslation($query);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => [
'PageSize' => Com::postPerPage(),
],
'sort' => [
'attributes' => [
'country_name',
'country_code'
],
'defaultOrder' => SORT_ASC
]
]);
$this->load($params);
if(!$this->validate()) {
return $dataProvider;
}
$query->andFilterWhere(['like', 'CL.country_name', strtolower($this->country_name)])
->andFilterWhere(['like', 'C.country_code', strtolower($this->country_code)])
->andFilterWhere(['like', 'C.country_status', $this->country_status]);
return $dataProvider;
}
}