vunh00/yaml-configuration
Composer 安装命令:
composer require vunh00/yaml-configuration
包简介
Add YAML file support to Laravel Configuration
README 文档
README
This package uses Symfony/Yaml parser.
Installing
Add "vunh00/yaml-configuration": "3.1.*" to your composer.json by running :
php composer.phar require vunh00/yaml-configuration
And select version : 3.1.*
Add support in Laravel
You have to add (or merge)
protected function bootstrappers() { $this->bootstrappers[] = 'Vunh00\Core\Config\LoadYamlConfiguration'; return $this->bootstrappers; }
to your app/Http/Kernel.php and/or app/Console/Kernel.php.
How to use
Just use regular php files or use yml or yaml files instead.
PHP :
<?php return [ 'debug' => false, 'key' => 'foobar', ];
Will be equivalent to :
YAML
debug: false key: foobar
Use functions
You can use any php functions like that :
routes_file: %app_path%/routes.php unit_test: %base_path:behat.yml% something: %sprintf:hell %s,world%
Enjoy it ! Feel free to fork :) !
This package is fork of devitek/yaml-configuration
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-13