Hello,
I don't know if it's a good practice, but I wanted to put the controllers for my admin in a subfolder called 'admin' to keep it tidy. So I've changed the namespace like this...
Code:
namespace App\Controllers\admin;
... copied the base controller in my admin folder (that's probably the problem)
...And change my routes like this...
Code:
$routes->post('/admin/mycontroller', 'admin/Mycontroller::mymethod');
Everything worked well till I wanted to pass arguments...
It works like this :
Code:
$routes->match(['get','post'], '/admin/translations/(: segment)', 'Admin_translations::translate/$1');
It doesn't work like this :
Code:
$routes->match(['get','post'], '/admin/translations/(: segment)', 'admin/Translations::translate/$1');
What should I do to fix this issue ?
Thank you for any help !