Place this in the AppServiceProvider in the boot() method
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
use Illuminate\Routing\UrlGenerator;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app['request']->server->set('HTTPS', true);
}
/**
* Bootstrap any application services.
*/
public function boot(UrlGenerator $url): void
{
$url->forceScheme('https');
// URL::forceScheme('https');
}
}
fix livewire content mixed http and https