Published 2 months ago by bipin
hello, guys I m using laravel 5.4 version and recently I buy https and SSL certificate, now my problem is that what things are required to change in my project code or in xampp for eg currently my domain is like http://mydomain.com what file or code I had to change or rewrite after my URL or adding https ( https://mydomain.com) I m new to this thing
You need to update the APP_URL in the .env file to your https version.
It's often helpful to add
boot() method of the AppServiceProvider (in app/Providers)
One other thing you should do is at the server level. You should redirect http to https for apache/nginx. You shouldn't be able to access the site with http and https. One or the other, not both.
If you hardcoded any links with http, you should convert them all to https. If you used any of laravels helpers to generate urls, you should be fine.
If you are loading any 3rd party scripts, or anything else from an external host (maybe you're pulling in scripts from a cdn, or loading images from an external domain), those should all use the https version of the cdn.
After the above is done, start browsing your site and see if you get the green lock symbol on all pages. If you get any "mixed content" errors for a page, inspect it for any links/images/etc beginning with http and convert them.