I have a laravel 5 application in which I`m trying to do a pagination for certain results (array of results not collection). This is my code:
$paginator = new LengthAwarePaginator(
$l_aResponse['body'],
count($l_aResponse['body']),
'2',
Paginator::resolveCurrentPage(),
['path' => Paginator::resolveCurrentPath()]
);
return str_replace('/?', '?', $paginator->render());
My question is: is there a way to modify the way in which the "page" parameter is setup in the URL for pages? EG: I don't want this format: http://localsite/articles?page=3 but I want http://localsite/articles/3
I`ll appreciate any answer. Thanks!