Skip to content

Registry manager for Laravel 4. An alternative for managing application configurations and settings. Now with the magic of caching.

License

Notifications You must be signed in to change notification settings

kwolniak/laravel-4-registry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Registry Manager for Laravel 4 - Alpha

Latest Stable Version Total Downloads

Registry manager for Laravel 4. An alternative for managing application configurations and settings. Now with the magic of caching.


Installation

Add the following into your composer.json file:

{
	"require": {
		"torann/registry": "dev-master"
	}
}

Add the service provider and alias into your app/config/app.php

'providers' => array(
	'Torann\Registry\RegistryServiceProvider',
),

'Registry' => 'Torann\Registry\Facades\Registry',

Run php artisan migrate --package="torann/registry" to install the registry table

Usage

Retrieve an item from the 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::set('foo', 'bar');
Registry::set('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

Registry::flush();

Mass update

$settings = Input::get('site_name', 'company_address', 'email');

Registry::store($settings);

About

Registry manager for Laravel 4. An alternative for managing application configurations and settings. Now with the magic of caching.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%