Skip to content

Commit

Permalink
Merge pull request #20 from bakaphp/fix/pagination-response
Browse files Browse the repository at this point in the history
add total rows to pagination results
  • Loading branch information
kaioken authored Apr 16, 2019
2 parents b2f3b04 + ec6deb0 commit 980a165
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Rest/CrudExtendedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function index($id = null): Response
'limit' => $limit,
'page' => $this->request->getQuery('page', 'int', 1),
'total_pages' => ceil($count / $limit),
'total_rows' => $count
];
}

Expand Down

0 comments on commit 980a165

Please sign in to comment.