<?php

namespace App\Providers;

use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        //
    }

    public function boot(): void
    {
        // Behind Caddy (TLS terminated upstream, http internally), force
        // https:// URLs so assets and forms do not become mixed content.
        if (str_starts_with((string) config("app.url"), "https://")) {
            URL::forceScheme("https");
            URL::forceRootUrl(config("app.url"));
        }
    }
}
'PHPEOF'
php -l app/Providers/AppServiceProvider.php >/dev/null && echo "repo updated" && cat app/Providers/AppServiceProvider.php | head -5
