why would you hide them?
try using ->simplePaginate($numberPerPage) maybe?
hide fields in paginator
Hi everyone. I've implemented the default paginator of laravel.
collectionName->paginate($numberPerPage).
All is good. I receive the response:
"current_page": 1, "data":[ all data here], "first_page_url": "http://homestead.test/api/user/orders?page=1", "from": 1, "last_page": 2, "last_page_url": "http://homestead.test/api/user/orders?page=2", "next_page_url": "http://homestead.test/api/user/orders?page=2", "path": "http://homestead.test/api/user/orders", "per_page": 5, "prev_page_url": null, "to": 5, "total": 10
Now i want to hide some fields which i not use, such us first_page_url and others. How can i do ?? I want to do this every time i call the function paginate().
Thank you for your time.
Please or to participate in this conversation.