elphie / registry
Laravel 4 registry manager for application configurations and settings
Installs: 186
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/elphie/registry
Requires
- php: >=5.3.0
Requires (Dev)
- illuminate/support: 4.0.x
- mockery/mockery: 0.8.0
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2017-11-05 07:24:03 UTC
README
Registry manager for Laravel 4. An alternative for managing application configurations and settings.
Installation
Add the following into your composer.json file:
{
"require": {
"elphie\registry": "2.0.x"
}
}
Add the service provider and alias into your app/config/app.php
'providers' => array( 'Elphie\Registry\RegistryServiceProvider', ), 'Registry' => 'Elphie\Registry\Facades\Registry',
Run php artisan config:publish "elphie\registry"
Run php artisan migrate --package="elphie\registry" to install the registry table
Changelogs
ver 2.0
- Add Driver interface
- Add Registry manager
- Add Fluent registry driver
- Remove set() function
- Add store(), dump() and flush() functions
Usage
Retrieve item from registry
Registry::get('foo'); \\will return null if key does not exists Registry::get('foo.bar'); \\will return null if key does not exists Registry::get('foo', 'undefine') \\will return undefine if key does not exists
Store item into registry
Registry::store('foo', 'bar'); Registry::store('foo', array('bar' => 'foobar')); Registry::get('foo'); \\bar Registry::get('foo.bar'); \\foobar
Remove item from registry
Registry::forget('foo'); Registry::forget('foo.bar');
Flush registry table
Registry::flush();
Dump all values from an item
Registry::dump('foo');