CodeIgniter Forums
Call BaseController custom function in view - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Call BaseController custom function in view (/thread-76185.html)

Pages: 1 2


RE: Call BaseController custom function in view - kilishan - 04-20-2020

If I were doing this, I'd add it to a config file. It's not something that changes on a per-controller basis, I wouldn't think so a config setting makes the most sense. If you did need to change it on a per-controller basis, make it an argument to to helper, and pass it in when you call it in the view.