krom/laravel-yaml-configuration

Add YAML file support to Laravel Configuration
3
Install
composer require krom/laravel-yaml-configuration
Latest Version:2.1.2
PHP:>=5.4.0
Last Updated:Dec 29, 2015
Links: GitHub  ·  Packagist
Maintainer: kudlayry

Add Yaml file support for Laravel 5.1 Configuration

This package uses Symfony/Yaml parser.

Installing

Add "krom/laravel-yaml-configuration": "2.*" to your composer.json by running :

php composer.phar require krom/laravel-yaml-configuration

And select version : 2.*

Add support in Laravel

You have to add (or merge)

protected function bootstrappers()
{
    return array_merge($this->bootstrappers, [\\krom\\Core\\Config\\LoadYamlConfiguration::class]);
}

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

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440