Welcome Guest, Not a member yet? Register   Sign In
Config helper function
#1

(This post was last modified: 10-23-2018, 10:26 AM by superior. Edit Reason: Find the solution )

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/g...ation.html (.env explanation).
Solved this by adding it to the .env file and call it with "getenv('somevar')"
Reply


Messages In This Thread
Config helper function - by superior - 10-23-2018, 10:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB