Welcome Guest, Not a member yet? Register   Sign In
question about routes and filter
#2

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) {
    $routes->add('foo''Admin\Foo::index'); // any verb (GET, POST, PUT, DELETE…)
    $routes->get('bar''Admin\Bar::index'); // GET only
    $routes->post('biz''Admin\Biz::index'); // POST only
    $routes->match(['get''post'], 'baz''Admin\Baz::index'); // GET or POST only
}); 

See :
Grouping: http://codeigniter.com/user_guide/incomi...ing-routes
HTTP verbs: http://codeigniter.com/user_guide/incomi...-in-routes
Reply


Messages In This Thread
question about routes and filter - by Secux - 10-27-2021, 02:36 PM
RE: question about routes and filter - by includebeer - 10-31-2021, 06:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB