Skip to content

Instantly share code, notes, and snippets.

@tieutantan
Last active November 8, 2017 16:39
Show Gist options
  • Save tieutantan/0fe26f7aae26f66e9f6f3762cb0d9e7c to your computer and use it in GitHub Desktop.
Save tieutantan/0fe26f7aae26f66e9f6f3762cb0d9e7c to your computer and use it in GitHub Desktop.
Guide use custom Config in FuelPHP
<?php
// load file fuel/app/config/system.php and groupname = name of group config, TRUE = set group config same filename
Config::load('system', 'groupname');
// set value for key active in group groupname
Config::set('groupname.active', 'ok');
// delete key active in group groupname
Config::delete('groupname.active');
// save group 'groupname' system to file system.php
Config::save('system', 'groupname');
// example get value of config
Debug::dump(Config::get('system'));
<?php
return array(
'active' => 'ok',
'text' => 'this is text',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment