| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function toArray(Request $request): array |
||
| 26 | { |
||
| 27 | /** @var LengthAwarePaginator<int, ListCommentResource> $paginator */ |
||
| 28 | $paginator = $this->resource; |
||
| 29 | |||
| 30 | return [ |
||
| 31 | 'data' => $this->collection, |
||
| 32 | 'meta' => [ |
||
| 33 | 'current_page' => $paginator->currentPage(), |
||
| 34 | 'from' => $paginator->firstItem(), |
||
| 35 | 'last_page' => $paginator->lastPage(), |
||
| 36 | // 'path' => $paginator->path(), |
||
| 37 | 'per_page' => $paginator->perPage(), |
||
| 38 | 'to' => $paginator->lastItem(), |
||
| 39 | 'total' => $paginator->total(), |
||
| 40 | ], |
||
| 44 |