<?php

namespace Tricks\LaravelTools;

use Dotenv\Dotenv;
use Illuminate\Foundation\Application;

class DynamicEnv
{
    public static function load(): void
    {
        $basePath = Application::inferBasePath();
        if (file_exists($basePath.'/.env.dynamic')) {
            $dotenv = Dotenv::createImmutable($basePath, '.env.dynamic');
            $dotenv->load();
        }
    }
}
