$config = new DummyConfigLoader\Config(__DIR__); // this will look for config files in this folder
$value = $config->get('database.default.driver', 'mongodb');You will get mariadb as $value if you will place file database.php in the given folder with contents:
return [
"default" => [
"driver" => "mariadb"
]
];Otherwise you will get mongodb.
First section of any key addresses the file within the directory. One level of recursion allowed. If no such file found in the folder - exception will be thrown.
composer require lezhnev74/dummy-config-loader
If you need help - feel comfortable to ping me at lezhnev.work@gmail.com