I think there’s proper solution. Configure the yii\data\Sort
object:
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort'=> ['defaultOrder' => ['topic_order' => SORT_ASC]],
]);
Official doc link
I think there’s proper solution. Configure the yii\data\Sort
object:
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort'=> ['defaultOrder' => ['topic_order' => SORT_ASC]],
]);
Official doc link