We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bb2f74 commit a632c4bCopy full SHA for a632c4b
src/Controllers/RestResponse.php
@@ -657,10 +657,10 @@ public static function created()
657
return (new self())->code(201);
658
}
659
660
- public static function index(AbstractPaginator $paginator)
+ public static function index(AbstractPaginator $paginator, array $meta = null)
661
{
662
return response()->json([
663
- 'meta' => RepositoryCollection::meta($paginator->toArray()),
+ 'meta' => $meta ?? RepositoryCollection::meta($paginator->toArray()),
664
'links' => RepositoryCollection::paginationLinks($paginator->toArray()),
665
'data' => $paginator->getCollection(),
666
]
0 commit comments