1

The laravel web application is in development for last 20 days. Now its required to be on https instead of http, so need to change whole code for https because laravel either requires to pass third parameter as true for script and style sheets. Or need to append or prepend secure word in fuction call like secure_assets

So my question is simple as that, can I have some parental logic by which I can efficiently manage the transfer without bothering about request method is secure or not.

Thanks!

Rajan Rawal
  • 6,171
  • 6
  • 40
  • 62

1 Answers1

2

What you need to do is change apache or nginx server to only serve https in the first place. Either in the nginx config or in a .htaccess file.

From there every link within Laravel will automatically be https://yourdomain.com without any need for a single line of code change.

Laurence
  • 58,936
  • 21
  • 171
  • 212