laravel-cursor-paginator icon indicating copy to clipboard operation
laravel-cursor-paginator copied to clipboard

Improvement of next_item in meta

Open misog opened this issue 3 years ago • 0 comments

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

misog avatar Jan 14 '21 13:01 misog