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

(05-07-2019, 06:27 AM)bartMommens Wrote:
(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.

Hey bartMommens, glad you think so! It will hopefully proved to be really powerful and flexible for many needs, so looking forward to seeing how it gets used!
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB