Welcome Guest, Not a member yet? Register   Sign In
CI3 to CI4 Migrations (__construct)

(04-16-2019, 06:42 AM)kilishan Wrote: You can definitely use the constructor for almost anything you need to. It was purposefully left blank so framework code didn't get in the way of what you needed.

However, redirects no longer work from within constructors. Instead, you should look at controller filters for permission checks and the like.

Hi Kilishan,

I finally dived into codeigniter 4 's Controller filters and must say: i'm amazed how powerful this really is. Compared to Codeigniter 3 this is a serious code reduction for some projects.

Thank you pointing me into the right direction.

Messages In This Thread
RE: CI3 to CI4 Migrations (__construct) - by bartMommens - 05-07-2019, 06:27 AM

Theme © iAndrew 2016 - Forum software by © MyBB