Is there a way to change one or more "Route's parameters", and re-build URL based on the modified parameters, ex: change "$page" value.
I tried many ways:
Route::current()->setParameter('page', ++$page);
// also try
Request::route()->setParameter('page', ++$page);
but always when re-request, URL:
$request->path(); //return path with origin parameter value
$request->url(); //return path with origin parameter value
Is there a way to replace "parameter" value then retrieve URL with updated value? thanks,
{page}in routes and then add that to controller likeRouteController(Request $request, $page) {}.