CodeIgniter Forums
Config helper function - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Discussion (
+--- Thread: Config helper function (/thread-71990.html)

Config helper function - superior - 10-23-2018


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!

Stupid me, you can do this via (.env explanation).
Solved this by adding it to the .env file and call it with "getenv('somevar')"