$config = new ConfigNest([ 'database' => [ 'host' => 'localhost', 'username' => 'root', 'password' => '', 'database_name' => 'my_database' ] ]); $config->set('database.host', '127.0.0.1'); // New configuration: // [ // 'database' => [ // 'host' => '127.0.0.1', // 'username' => 'root', // 'password' => '', // 'database_name' => 'my_database' // ] // ]
$config = new ConfigNest([ 'database' => [ 'host' => 'localhost', 'username' => 'root', 'password' => '', 'database_name' => 'my_database' ] ]); $host = $config->get('database.host'); // Returns 'localhost'Package library: This code belongs to the Config Nest library.