andersao / andersao/l5-repository

Paginated Object Missing Keys

オープン
#451 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
enhancement
主要言語
PHP
スター
4.2k
フォーク
880
PR マージ指標
30日以内にマージされた PR はありません

説明

Is it possible to have the paginated object mimic Laravel's output?

Laravel Output
```
{
current_page: 1
data: Array[10]
from: 1
last_page: 43
next_page_url: "http://website.dev/api/events?page=2"
path: "http://website.dev/api/events"
per_page: 10
prev_page_url: null
to: 10
total: 425
}
```

l5 Repo Output
```
{
data: Array[10]
meta: {
pagination: {
count: 10
current_page: 1
links: Object
per_page: 10
total: 425
total_pages: 43
}
}
}
```

You'll notice 3 missing keys: `to`, `from`, `path`

It would be nice if some of the other keys kept the same name such as total/count, last_page/total_pages, etc.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。