edit this page Basic 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', 'undefined') // will return undefined if key does not exists

Store item into registry

Registry::set('foo', 'bar');
Registry::set('foo', ['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 = [
    'site_name' => 'FooBar, Inc.',
    'address'   => '11 Bean Street',
    'email'     => 'foo@bar.com'
];

Registry::store($settings);