Simple Way To HTTPS All Laravel Routes
Simple Way To HTTPS All Laravel Routes
09 MAY 2017
I thought this would be a quick search on the internet to make all routes HTTPS in Laravel, but came across a lot of solutions and a lot which seemed like to much code/work for something that i thought would be a quick fix and some of the solutions just did not work for me.
After a while of searching the simplest way i found was to edit:
C:\VolledServer\volled\app\Providers\AppServiceProvider
and at the top of AppServiceProvider file add:
use Illuminate\Support\Facades\URL;
and then under boot add the below.
public function boot()
{
URL::forceScheme('https');
}
That's how simple it was, now all routes should use HTTPS.
Thu May 11 10:44:53 2017
- permalink
-
-
-
http://seanoneill.me/eaest-way-to-https-on-all-laravel-routes/