xiaolin / laravel-config
config
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/xiaolin/laravel-config
Requires
- php: >=7.0
- symfony/var-dumper: ^4.1
- symfony/yaml: ^4.1
- xiaolin/support-arr: ^0.0.1
Requires (Dev)
- phpunit/phpunit: >=5.6
This package is not auto-updated.
Last update: 2025-09-26 16:06:22 UTC
README
文件内容
local: mysql: host: 127.0.0.1 port: 3306 dev: mysql: host: 127.0.0.1 port: 3306 ## 读取 ```php <?php $file = 'config.yml'; Yaml::getInstance()->load($file);
写入
<?php $file = 'config.yml'; $data = Yaml::getInstance()->save($file, $data); $data['mysql']['port'] = 3307; yml_write($file,$data);