devitek/yaml-configuration
Add YAML file support to Laravel Configuration
14,238
16
| Install | |
|---|---|
composer require devitek/yaml-configuration |
|
| Latest Version: | 3.1.1 |
| PHP: | >=5.4.0 |
| Laravel: | 5 |
| Older releases: | 4 |
| License: | MIT |
| Last Updated: | Apr 24, 2024 |
| Links: | GitHub · Packagist |
Maintainer: CaporalDead
Add Yaml file support for Laravel 5.2 Configuration
This package uses Symfony/Yaml parser.
Installing
Add "devitek/yaml-configuration": "3.1.*" to your composer.json by running :
php composer.phar require devitek/yaml-configuration
And select version : 3.1.*
Add support in Laravel
You have to add (or merge)
protected function bootstrappers()
{
$this->bootstrappers[] = 'Devitek\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 :) !
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
665,354,487
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
458,029,405
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
424,642,029
4,662
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.1.1 | >=5.4.0 | ~5.2 | MIT | |
| 3.1 | >=5.4.0 | >=5.2 | ||
| 3.0 | >=5.4.0 | 5.* | ||
| 2.2 | >=5.4.0 | 5.* | ||
| 2.1 | >=5.4.0 | 5.* | ||
| 2.0.1 | >=5.4.0 | 5.* | ||
| 2.0 | >=5.4.0 | 5.* | ||
| 1.0.1 | >=5.4.0 | 5.x | ||
| 1.0 | >=5.4.0 | 5.x | ||
| 0.1.4 | >=5.4.0 | 4.x | ||
| 0.1.3 | >=5.4.0 | 4.x | ||
| 0.1.2 | >=5.4.0 | 4.x | ||
| 0.1.1 | >=5.4.0 | 4.x | ||
| 0.1 | >=5.4.0 | 4.x |
