How to fix Mixed Content: https error on laravel apps

If you are using a proxy or load balancer (like AWS or Heroku), ensure you trust the proxy by setting AppServiceProvider to handle HTTPS detection:

<?php

use Illuminate\Support\Facades\URL;

public function boot()
{
    if($this->app->environment('production')) { // Default value should be false for local server
        URL::forceScheme('https');
    }
}