Welcome Guest, Not a member yet? Register   Sign In
Load custom config file?
#1

I made a custom config file with some general settings I want to access in my controllers.

When I make a new controller and load the config file I can access the variables I set:

Code:
$customvalues = new \Config\Custom();
echo $customvalues->myvalue;

How can I load the config file so that I dont have to initiate a new instance in every class of the controller but like in codeigniter 3 one would do in a constructor function?
Reply


Messages In This Thread
Load custom config file? - by vinyl - 04-11-2020, 05:51 AM
RE: Load custom config file? - by includebeer - 04-12-2020, 07:23 AM
RE: Load custom config file? - by InsiteFX - 04-12-2020, 02:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB