laravel-cursor-paginator
laravel-cursor-paginator copied to clipboard
Improvement of next_item in meta
Hi, the meta
field in JSON response includes next_item
object.
There are multiple problems with this
- It exposes all model attributes (no transformer/resource support)
- Can not be configured/disabled in
config/cursor_paginator.php
- It is not meta data
Workarounds can be done such as removing/modifying the field in middleware (see https://laracasts.com/discuss/channels/laravel/globally-append-meta-data-to-api-resources?page=1#reply=445439) or creating ResourceCollection class.
However it would be nice to be able to disable next_item
from config/cursor_paginator.php