Welcome Guest, Not a member yet? Register   Sign In
problem with custom controller constructor
#2

Don't use a constructor. Override initController(), don't forget to call parent::initController(), and then do what you need to do.
But, a better approach, would be to create a filter and do your redirect in it.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: problem with custom controller constructor - by includebeer - 05-29-2021, 12:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB