Download the PHP package jameswmcnab/config-yaml without Composer
On this page you can find all versions of the php package jameswmcnab/config-yaml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jameswmcnab/config-yaml
More information about jameswmcnab/config-yaml
Files in jameswmcnab/config-yaml
Package config-yaml
Short Description A simple YAML config file loader for Laravel, taking inspiration from illuminate/config.
License MIT
Informations about the package config-yaml
Abandoned
This package is abandoned and no longer maintained. The author suggests using the pragmarx/yaml package instead.
YAML Config Loader for Laravel
This provides simple YAML config loading to Laravel. It takes a lot of inspiration from the illuminate/config
package
and uses the Symfony YAML parser.
This is not a replacement for the built-in PHP config file system in Laravel but is intended as an extra 'layer' of
configuration. This allows you to have one or more Ruby-like config.yaml
files containing user-configurable config
for your application.
By default the package assumes your YAML files are in the base_path()
directory, but you can customise
this by publishing the package config file (config-yaml.php
) to your application and changing the yaml_path
key.
Installation
Installation is via Composer:
Publish package config (optional)
If you want to customise the package config, publish the package config then edit the newly created config/config-yaml.php
file:
Usage
Example YAML file:
`
Using the facade
Note: Remember to register the facade in your app.php
config.
Using dependency injection
If you don't want to use the facade just directly inject Jameswmcnab\ConfigYaml\RepositoryInterface
wherever dependency
injection is supported and use it directly:
Running Tests
To run the package tests:
All versions of config-yaml with dependencies
illuminate/contracts Version 5.5.*|5.6.*
illuminate/support Version 5.5.*|5.6.*
illuminate/filesystem Version 5.5.*|5.6.*
symfony/yaml Version ^3.0|^4.0