Config helper function - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Config helper function (/showthread.php?tid=71990) |
Config helper function - superior - 10-23-2018 Hello, In the previous version (3.x) you could call a config item by calling it like "config_item('somevar');" but in CI4 I cannot find it (or me is stupid).. Did this change, and do we need to work around it, or is it just calling the config in the controller because it's not autoloaded by default? By the way i'm talking about the main config. Thanks in advance! Edit: Stupid me, you can do this via https://bcit-ci.github.io/CodeIgniter4/general/configuration.html (.env explanation). Solved this by adding it to the .env file and call it with "getenv('somevar')" |