I'm using Laravel and Twig as template language and "https" all around the site. I'm having trouble getting all our non-https assets to transfer over to their https URL's in production.
Both of these...
{{ html_style('/css/global.css') }}
{{ html_script('/js/global.js') }}
...render this in production:
<link type="text/css" rel="stylesheet" href="http://website.com/css/global.css">
<script src="http://website.com/js/global.js"></script>
...when I want them to render:
<link type="text/css" rel="stylesheet" href="https://website.com/css/global.css">
<script src="https://website.com/js/global.js"></script>
How can I still use relative paths in Laravel and force https on production?
Lastly, I get that this forces https:
{{ html_style('css/modals.css',[], true) }}
...but then it breaks my local machine because it's looking for https locally.
if you have setup the environments, then use this....
{{ html_style('css/modals.css',[], !App::isLocal()) }}
though a more elegant solution is self signed certificate locally.