Bug in routes with path in controller |
(11-30-2019, 05:41 AM)midhunlalkc Wrote: Am also experiencing the same issue with routes with parameters It is because codeigniter is expecting all of your controllers to be in one folder, App/Controllers. If you try to reference it out of that, then it says it can't find it and throws a 404 error. The solution is really simple, just tell it where the new namespace is: $routes->add('(:num)/edit', 'Users::editGroup/$1', ['as' => 'edit_group', 'namespace' => 'App\Controllers\Backend']); https://codeigniter4.github.io/userguide/incoming/routing.html#assigning-namespace Hope that helps you solve your issue. |
Welcome Guest, Not a member yet? Register Sign In |