5

I am using Lumen 5.5 and using the following code chunk under app/providers/appServiceProvider.php in boot method.

\URL::forceSchema('https');

It was compatible with the earlier version of Lumen 5.2

Is there any way to sort this out without using mod_rewrite and middleware approaches.

Abdul Samad
  • 81
  • 1
  • 8

2 Answers2

8

It appears the function has changed name from forceSchema to forceScheme.

Andrei Zisu
  • 4,292
  • 4
  • 21
  • 32
5

You are using Lumen 5.2.

In Laravel 5.2 or earlier version it was working fine.

\URL::forceSchema('https');

In Laravel 5.4 or above version it changed to

\URL::forceScheme('https');

Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51