CodeIgniter Forums
Custom Library config file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Custom Library config file (/showthread.php?tid=76892)



Custom Library config file - vinyl - 06-30-2020

I am creating a custom library in Codeigniter 4 which is located in the Library folder.. I have a config file which is in the default config file folder.

Is there a method to shorten the way the variables from the config file are called?

This is the way I do it now inside every function:
config('Myconfig')->varInsideConfig;