Order of filter |
I have 2 filters one is global and another one in routers for few controllers
and i saw when i load controllers with extra filter like $routes->get('/', [StockShop::class, 'Index/List'], [ 'filter' => 'isBlocked' ]); firstly execute isBlocked filter than global one, is it possible change order? Rightly execute global first than others
The filters are executed in the order defined in the config file. However, if enabled, DebugToolbar is always executed
last because it should be able to capture everything that happens in the other filters. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-04-2023, 12:06 AM)InsiteFX Wrote: The filters are executed in the order defined in the config file. However, if enabled, DebugToolbar is always executed In config only global, in routers setting filter in route, how config order?
I sent a PR to change the order.
https://github.com/codeigniter4/CodeIgniter4/pull/7955 |
Welcome Guest, Not a member yet? Register Sign In |