04-11-2020, 05:51 AM
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:
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?
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?