Home
Home

Force Laravel to Generate HTTPS Links

If you want to force Laravel to generate HTTPS links, add this to the boot method of your AppServiceProvider.php:

\URL::forceScheme('https');

Related Posts

  • Setup Xdebug in Laravel Valet with PHP 7.4 and PHPStorm
  • Laravel Form Model Binding Generates Empty Input Fields
  • Fix "No application encryption key has been specified." When Using Laravel
  • Tutorial: Ubuntu 18.04 LAMP Setup for WordPress
  • Fix "419 Sorry, your session has expired" After Renaming a Laravel Project
  • Install Umami Analytics with Let's Encrypt HTTPS
  • Install Laravel 5.5 at Codeanywhere with PHP 7.1 and MySQL 5.7
2021 by Sebastian Widmann | Privacy Policy | Site Notice