CI3 to CI4 Migrations (__construct) |
Hello,
i'm currently migrating a CI3 project over to CI4, my old project relied heavily on __constructor() so that each extended controller would require this. PHP Code: public function __construct($permission_to_check) So each extended controller checks a specific permission on construct and redirects if the permission is not set. PHP Code: parent::__construct('has_perm_024D'); In CI4 i've noticed that __construct() is no longer required i wonder if it's still a "good practice" to use the __construct() function or is there a way to achieve this with the initController function. It might be a silly question but i want to get it right from the start Thanks for the tips and / or info. Best regards, Bart |
Messages In This Thread |
CI3 to CI4 Migrations (__construct) - by bartMommens - 04-16-2019, 06:34 AM
RE: CI3 to CI4 Migrations (__construct) - by kilishan - 04-16-2019, 06:42 AM
RE: CI3 to CI4 Migrations (__construct) - by bartMommens - 05-07-2019, 06:27 AM
RE: CI3 to CI4 Migrations (__construct) - by kilishan - 05-07-2019, 06:45 AM
RE: CI3 to CI4 Migrations (__construct) - by Avega Soft - 05-07-2019, 09:02 PM
RE: CI3 to CI4 Migrations (__construct) - by kilishan - 05-08-2019, 07:05 AM
RE: CI3 to CI4 Migrations (__construct) - by Avega Soft - 05-10-2019, 12:12 AM
RE: CI3 to CI4 Migrations (__construct) - by ysarsilmaz - 07-20-2020, 02:19 AM
RE: CI3 to CI4 Migrations (__construct) - by bartMommens - 04-16-2019, 06:55 AM
|