Welcome Guest, Not a member yet? Register   Sign In
Problem with routes if Controller is in a subfolder
#5

(This post was last modified: 06-29-2020, 05:41 AM by kilden.)

I think it's exactly what I did just below... My sub-folder is 'admin', my controller 'Translations' and my method 'translate':

(06-28-2020, 09:04 PM)kilden Wrote: It doesn't work like this :
Code:
$routes->match(['get','post'], '/admin/translations/(:alpha)', 'admin/Translations::translate/$1');

I put the name of the sub-folder in the route, but when passing arguments, it doesn't work and the controller or method is not found !  Undecided

Or should I put a "/" instead "::" between controller and method  ?
$routes->match(['get','post'], '/admin/translations/(: segment)', 'admin/Translations/translate/$1');
Reply


Messages In This Thread
RE: Problem with routes if Controller is in a subfolder - by kilden - 06-29-2020, 05:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB