It’s important to know how to redirect http to Https, You did this by using htaccess, but you will see something like below image.
It’s very simple to get out from this errors. Follow the below steps.
- Open YOUR_PROJECT/Providers/AppServiceProvider.php
- Add the below line inside boot function/method. Like below code
public function boot() { URL::forceScheme('https'); }
- Make sure to import at top “use Illuminate\Support\Facades\URL;” Now your AppServiceProvider.php will looks like below code.
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\URL; class AppServiceProvider extends ServiceProvider { public function register() { // } public function boot() { URL::forceScheme('https'); } }
Now it’s done. This is a small post, but if it will help you then please share this post.