https://github.com/bosnadev/yaml
A package to add Yaml file support for Laravel 4 Configuration
https://github.com/bosnadev/yaml
Last synced: 24 days ago
JSON representation
A package to add Yaml file support for Laravel 4 Configuration
- Host: GitHub
- URL: https://github.com/bosnadev/yaml
- Owner: bosnadev
- Created: 2014-11-07T19:20:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-03T15:51:56.000Z (about 10 years ago)
- Last Synced: 2025-04-13T01:45:59.452Z (24 days ago)
- Language: PHP
- Size: 163 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Yaml file support for Laravel 4 Configuration
====This package is based on a [devitek/yaml-configuration](https://github.com/Devitek/laravel-yaml-configuration/) package. It uses Symfony/Yaml parser.
Yaml configuration package is part of Larapress CMS.Installation
====Run the following command from your terminal:
```
composer require "bosnadev/yaml: 1.*"
```or add this to require section in your composer.json file:
```
"bosnadev/yaml": "1.*"
```and run ```composer update```
After updating composer, add the **YamlServiceProvider** to the providers array in app/config/app.php
```
'providers' => [
// other providers
...
'Bosnadev\Yaml\YamlServiceProvider'
];
```And that's it! You can now add your .yaml configuration files into **app/config** or in your package config folders.
You can continue to use regular php files for configs.PHP:
```
true,
'themes_dir' => %public_path%/themes
];
```Will be equivalent to :
```
---
enable_registration: true
themes_dir: %public_path%/themes
```Paths Helpers
====You can use paths helpers provided by Laravel like that :
```yaml
routes_file: %app_path%/routes.php
unit_test: %base_path%/behat.yml
main_style: %public_path%/css/style.css
manifest: %storage_path%/meta
```* %app\_path% refers to app\_path()
* %base\_path% refers to base\_path()
* %public\_path% refers to public\_path()
* %storage\_path% refers to storage\_path()License
--------This package is open-sourced software licensed under MIT License.