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

(05-10-2019, 12:12 AM)Avega Soft Wrote:
(05-08-2019, 07:05 AM)kilishan Wrote:
(05-07-2019, 09:02 PM)Avega Soft 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.

If I am right understanding the Controller Filters starting working before apps controllers and check url's or form action type as hooks in CI3 ?

Controller filters will be ran either just before running the controller method, or just after. There are still "hooks" in CI4 similar to what you're used to in CI3, but they've been renamed to "Events" now and made more flexible.


how did you share the code sample

Messages In This Thread
RE: CI3 to CI4 Migrations (__construct) - by ysarsilmaz - 07-20-2020, 02:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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