![]() |
Filters in filters folder. how to use them? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Filters in filters folder. how to use them? (/showthread.php?tid=90774) |
Filters in filters folder. how to use them? - xsPurX - 05-01-2024 Might seem like a dumb question, but I created this filter below, I am using Shield, I want the user to be redirected when accessing a protected controller. Right now it redirects to /login. and I want it to go to /pages/view/Login I added this filter, but how do I use it? Code: <?php Ok I just added it as an alias, Code: public array $aliases = [ Then added a filter like below, and that works. Code: 'LoggedIn' => ['before' => ['dashboard', 'dashboard/*']], |