how to force Laravel to use https in URL and assets?

By Laravel Developer

Infinitbility
1 min readDec 15, 2019

using the URL() helper is great for creating full HTTP links, I use this for all links, when working locally HTTP is fine but when going Production you want to use https instead.

Replace Your app\Providers\AppServiceProvider.php from below code

using this code Laravel on production force helper to use HTTPS URL.

Thanks For Reading…

You Have another option for force https visit link ( Laravel Helpers Doc )

For Current URL in Larvel

Thanks For Reading…

--

--