Skip to content

Devitek/laravel-yaml-configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add Yaml file support for Laravel 5.2 Configuration

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

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 :) !

About

A package to add support for yaml configuration files in Laravel 4

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages