question about routes and filter |
is it possible to take a dynamic value from (:num) and use it in a filter?
routes: PHP Code: $routes->group('(:num)', ['subdomain' => 'test1', 'filter' => 'filtertest:$1'], function ($routes) { as $1 is (:num) filter: PHP Code: public function before(RequestInterface $request, $arguments = null) reurn: Array ( [0] => $1 ) and one more question is it possible to put ['get', 'post'] in a group? ?
For your second question, yes you should be able to set a route for get and post. Something like this:
PHP Code: $routes->group('admin', function ($routes) { See : Grouping: http://codeigniter.com/user_guide/incomi...ing-routes HTTP verbs: http://codeigniter.com/user_guide/incomi...-in-routes
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Welcome Guest, Not a member yet? Register Sign In |