Commit 5303506c by Alexander Makarov

Merge pull request #3503 from djfly/patch-5

Update output-data-providers.md
parents ec224698 d5024f9a
...@@ -34,6 +34,13 @@ And the following example shows how to use ActiveDataProvider without ActiveReco ...@@ -34,6 +34,13 @@ 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' => [
// Set the default sort by name ASC and created_at DESC.
'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