mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-20 08:27:21 +08:00
Merge pull request #8854 from Linux2000/master
Update output-pagination.md
This commit is contained in:
@@ -30,8 +30,8 @@ $count = $query->count();
|
|||||||
$pagination = new Pagination(['totalCount' => $count]);
|
$pagination = new Pagination(['totalCount' => $count]);
|
||||||
|
|
||||||
// limit the query using the pagination and retrieve the articles
|
// limit the query using the pagination and retrieve the articles
|
||||||
$articles = $query->offset($pages->offset)
|
$articles = $query->offset($pagination->offset)
|
||||||
->limit($pages->limit)
|
->limit($pagination->limit)
|
||||||
->all();
|
->all();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user