Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

janokary's avatar

forceScheme or forceSchema in Laravel 5.4

I upgraded from 5.3 to 5.4 It seems that when you want to Render all URLs with https

\URL::forceSchema('https');

is now

\URL::forceScheme('https'); 

with an "e" instead of "a" in forceScheme

https://laravel.com/api/5.0/Illuminate/Routing/UrlGenerator.html#method_forceSchema vs https://laravel.com/api/5.4/Illuminate/Routing/UrlGenerator.html#method_forceScheme

can you confirm that?

0 likes
5 replies
tusharahmed's avatar

URL::forceScheme('https'); put this top of the web.php.

Please or to participate in this conversation.