I'm using Laravel 8 to build a simple API with paginated JSON.
The output contains a "links" object into "meta" key:
{
"data": [
{
. . .
},
{
. . .
}
],
"links": {
"prev": null,
"first": "http://localhost/api/my-api?&page=1",
"next": null,
"last": "http://localhost/api/my-api?&page=2"
},
"meta": {
"from": 1,
"per_page": 400,
"total": 477,
"current_page": 1,
"last_page": 2,
"path": "http://localhost/api/my-api",
"to": 400,
"links": [
{
"url": null,
"label": "Previous",
"active": false
},
{
"url": "http://localhost/api/my-api?&page=1",
"label": 1,
"active": true
},
{
"url": "http://localhost/api/my-api?&page=2",
"label": 2,
"active": false
},
{
"url": "http://localhost/api/my-api?&page=2",
"label": "Next",
"active": false
}
]
}
}
I've not found any documentation about it; also, the official documentation doesn't report it:
How can I remove the "links" object?