Commit 83a40698 by ff

Update output-data-providers.md

defaultOrder this is often used for everyone
parent 3893bcd0
...@@ -34,6 +34,7 @@ And the following example shows how to use ActiveDataProvider without ActiveReco ...@@ -34,6 +34,7 @@ And the following example shows how to use ActiveDataProvider without ActiveReco
$query = new Query(); $query = new Query();
$provider = new ActiveDataProvider([ $provider = new ActiveDataProvider([
'query' => $query->from('post'), 'query' => $query->from('post'),
'sort'=>['defaultOrder'=>['name' => SORT_ASC,'created_at' => SORT_DESC]],
'pagination' => [ 'pagination' => [
'pageSize' => 20, 'pageSize' => 20,
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment