Skip to content

Instantly share code, notes, and snippets.

@simshaun
Last active December 19, 2015 16:48
Show Gist options
  • Save simshaun/5986141 to your computer and use it in GitHub Desktop.
Save simshaun/5986141 to your computer and use it in GitHub Desktop.
Kohana example of config in the database
Kohana::$config->attach(new Config_Database);
CREATE TABLE IF NOT EXISTS `config` (
`group_name` varchar(100) NOT NULL,
`config_key` varchar(100) NOT NULL,
`config_value` text,
UNIQUE KEY `group_name_config_key` (`group_name`,`config_key`),
KEY `config_key` (`config_key`)
);
Kohana::$config->load('site.last_updated')
Kohana::$config->load('site')->set('last_updated', '2013-07-12');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment