When developing a Laravel project you might find yourself using Laravel to auto generate URLs to routes. Laravel won't automatically generate URLs using https and when using forms within your website if you are accessing the website with https and the form is using http you'll run into browser issues and warnings.
To force Laravel to generate all URLs using https you can implement the small code snippet below inside the AppServiceProvider class.
You will also need to include the following in the top of the class:
The AppServiceProvider class is located in app/providers.