• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI3 to CI4 Migrations (__construct)

#4
(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.
Reply


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.