Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Improvement of next_item in meta #15

Open
misog opened this issue Jan 14, 2021 · 0 comments
Open

Improvement of next_item in meta #15

misog opened this issue Jan 14, 2021 · 0 comments

Comments

@misog
Copy link

misog commented Jan 14, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant