Working with Filters Problem, Globals works Filters does not work |
Hi everyone,
Ok her is the issue i been trying to implement filter to check session of user is logged in or not. App\Filters\AuthFilter.php PHP Code: <?php namespace App\Filters; Fair enough. simple and direct from the UserGuide. Now on config directory App/Config/Filters.php PHP Code: <?php namespace Config; and for my controller App/Controllers/Account.php PHP Code: <?php namespace App\Controllers; Ok here is the thing When i make the filter global like the file currently it works. However when i deactivate $globals and activate $Filters IS JUST DOES NOT WORK! I really confused. And a small note if you don't mind me say. CodeIgniter4 Documentation is no more for beginners or php beginners like CI2 and CI3. It meant to be understood by a people who really have a good grasp of OOP and OOD patterns. No offence intended.
I enjoy coding in codeigniter4. SurveyIgniter a project where i learn about codeigniter4.
Ok i further tried debugging my code. here is what i found
It seems when i use any other method (Besides index and __cunstruct) the filter works... Please could someone elaborate to my why? why it behaves like this?
I enjoy coding in codeigniter4. SurveyIgniter a project where i learn about codeigniter4.
|
Welcome Guest, Not a member yet? Register Sign In |