Filters only for to use in route entries |
Hello all,
I am first time user of CodeIgniter started directly with 4.0.2. Have to say, congrats to everyone who was involved and of course thank you all. So my question: I would like to declare a filter in order to use with just in Routes.php like below. Even though I have declared my filter alias in Filters.php, it seems that filter does not load without declaring it in $filters. I don't want to declare it in $filters because I have clashing routes and {locale}/ master route which is causing a lot of trouble to me already and also causing a lot trouble with regex-like $filters Is there any way to achieve to do this? Should I try something from an unusual way? I am 'follow the rules' guy, so I thought maybe I am missing something and wanted to ask. Filters.php entry: Code: public $aliases = [ Routes.php entry: Code: $routes->group('client', ['filter'=>'auth-client'], function($routes) {
In fact I also have this problem, I am following the rules, declared the alias and I want to use the filter only on the path.
PHP Code: public $aliases = [ PHP Code: $routes->group('api', ['namespace' => 'App\Api'], function($routes) |
Welcome Guest, Not a member yet? Register Sign In |