Skip to content

Commit

Permalink
Ensure query parameters are retained with pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Oct 7, 2023
1 parent 3e51dec commit 88c07ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tags/RunwayTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ public function wildcard($resourceHandle = null)
}

if ($this->params->get('paginate') || $this->params->get('limit')) {
$paginator = $query->paginate($this->params->get('limit'))->withQueryString();
$paginator = $query->paginate($this->params->get('limit'));

$paginator = app()->makeWith(LengthAwarePaginator::class, [
'items' => $paginator->items(),
'total' => $paginator->total(),
'perPage' => $paginator->perPage(),
'currentPage' => $paginator->currentPage(),
'options' => $paginator->getOptions(),
]);
])->withQueryString();

$results = $paginator->items();
} else {
Expand Down

0 comments on commit 88c07ba

Please sign in to comment.