Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

muraligk's avatar

Laravel Pagination Host URL

Hi,

I'm using Laravel 5.6 pagination for my API's, Its working fine in my local. But when I host it on the server, I'm getting the load balancer URL instead of my domain name for next and previous page URLs.

I'm using AWS cloud hosting using cloud front and a load balancer.

The next and previous page URL's are like this, http://-lb-01-*.ap--1.elb.amazonaws.com/api/v1/products?page=1

I can use a regex to replace the host URL, but I want to know if any method is available already.

Thanks

0 likes
0 replies

Please or to participate in this conversation.