Check this thread:
Seems like the solution is doing this in your AppServiceProvider:
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->app['request']->server->set('HTTPS', true);
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
When paginating using {{ $posts->links() }}, Laravel is displaying the links as http:// instead of https://, even though I've specified https in the APP_URL inside .env, have set up URL::forceScheme('https'); in AppServiceProvider.php and am using SSL certs, not only from CloudFlare (using FULL), but have also installed a cert on the load balancer and am using LetsEncrypt on each server via Forge.
What could the issue be?
Check this thread:
Seems like the solution is doing this in your AppServiceProvider:
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->app['request']->server->set('HTTPS', true);
}
Please or to participate in this conversation.