Thanks. It's really odd. I'm deploying to AWS, but I can see my environment variables, and it's as I expect:
APP_URL: https://www.example.com ("example" inserted for privacy)
I've looked through the Laravel source and it's indeed looking at that variable...
if (! function_exists('asset')) {
/**
* Generate an asset path for the application.
*
* @param string $path
* @param bool|null $secure
* @return string
*/
function asset($path, $secure = null)
{
return app('url')->asset($path, $secure);
}
}
So why is it changing it to http://www.example.com? So strange! :(
My local .env file is http://localhost, but that's always what I have it set to. None of those local environment variables are being used anywhere, they're all being replaced by the AWS config.