Last active
          December 19, 2015 16:48 
        
      - 
      
- 
        Save simshaun/5986141 to your computer and use it in GitHub Desktop. 
    Kohana example of config in the database
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Kohana::$config->attach(new Config_Database); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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`) | |
| ); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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