"2020 Update? Url::forceScheme was acting funky for me, but this worked liked a dime."
https
code snippet.
resolve(\Illuminate\Routing\UrlGenerator::class)->forceScheme('https');
app/providers/RouteServiceProvider.php
. /**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
resolve(\Illuminate\Routing\UrlGenerator::class)->forceScheme('https');
parent::boot();
}
php artisan route:clear && composer dumpautoload
to clear Laravel's cached routes and cached Service Providers.