Answer the question
In order to leave comments, you need to log in
How to sort by two parameters?
Made sorting so that first it shows unprocessed orders, and then processed ones
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' =>
[
'defaultOrder' => [
'processed' => SORT_ASC
]
]
]);
Answer the question
In order to leave comments, you need to log in
'defaultOrder' => [
'processed' => SORT_ASC,
'date' => SORT_ASC,
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question