api-pagination
api-pagination copied to clipboard
Pagination link error
The link that is sent as a response to the index request is not an existing link, when I try to access it I get the error below.
{
"data": [
(The answer for "data" is correct.)
],
"links": {
"self": "http://localhost:3007/api/clients?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"first": "http://localhost:3007/api/clients?page%5Bnumber%5D=1&page%5Bsize%5D=2",
"prev": null,
"next": "http://localhost:3007/api/clients?page%5Bnumber%5D=2&page%5Bsize%5D=2",
"last": "http://localhost:3007/api/clients?page%5Bnumber%5D=4&page%5Bsize%5D=2"
}
}
The returned links do not exist, when I try to make a request to access them I get:
But when I try to access the link: http://localhost:3007/api/clients?page=2, everything works correctly