[eluser]vps4[/eluser]
usually, we put config setting in the database
but CI's config file loaded earlier than database library
now , the problem is : config must get through database library
my Solution is :
write a Model
but I think it's not good.
for example: some code in my Model
Code:
$query = $this->db->get('setting');
and add it to CI config
Code:
$this->config->set_item('setting', $this->setting);
and in the Controller
Code:
$something = $this->config->item('something', 'setting')
I almost collapsed, It make the simple things complicated
Although I have written to solve this problem
Is anybody have a good idea?