Commit d5024f9a by ff

Update output-data-providers.md

Modified a bit, better?
parent 83a40698
......@@ -34,7 +34,13 @@ And the following example shows how to use ActiveDataProvider without ActiveReco
$query = new Query();
$provider = new ActiveDataProvider([
'query' => $query->from('post'),
'sort'=>['defaultOrder'=>['name' => SORT_ASC,'created_at' => SORT_DESC]],
'sort' => [
// Set the default sort by name ASC and created_at DESC.
'defaultOrder' => [
'name' => SORT_ASC,
'created_at' => SORT_DESC
]
],
'pagination' => [
'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