Sublevel the pagination meta

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-18 18:49:21 +01:00
parent 9365c62d08
commit 561a90d9cb

View file

@ -8,7 +8,7 @@ class DatatablesTransformer
{ {
$objects_array['total'] = $paginator->total(); $objects_array['total'] = $paginator->total();
$objects_array['rows'] = $objects; $objects_array['rows'] = $objects;
$objects_array['meta'] = [ $objects_array['meta']['pagination'] = [
'per_page' => $paginator->perPage(), 'per_page' => $paginator->perPage(),
'current_page' => $paginator->currentPage(), 'current_page' => $paginator->currentPage(),
'last_page' => $paginator->lastPage(), 'last_page' => $paginator->lastPage(),