Custom view method |
In CI3, I created a custom view method (cView) by extending CI_Loader :
Quote:// My controller, log user data and search queries Since CI_Loader and the core folder no longer exist, I can't figure out where I should create my custom cView function in CI4? The main constrain is that cView() calls the native view() method.
Here are the complete code for view. You can create your own cView and put in in app/Common.php based on that. Or overwrite the system function.
https://codeigniter.com/user_guide/outgo...derer.html PHP Code: if (! function_exists('view'))
Thank you to all of you for these answers. I finally place my custom view in the BaseController since I use it everywhere in my apps: https://forum.codeigniter.com/thread-75176.html
|
Welcome Guest, Not a member yet? Register Sign In |