879 0 0 0
Last Updated : 2025-04-28 21:46:06
If you have purchased a SSl certificate for your website and then you website is still serving the assets from an HTTP protocol instead of https, and also the form and redirects are going to http instead of https, then here is the way to fix this from within laravel AppServiceProvide.
public function boot()
{
//Schema::defaultStringLength(191); //fix the error for migration of max length of field
//Force https on production servers
if(env('APP_ENV') !== 'local') {
URL::forceScheme('https');
}
}