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

Sorry I just able to go online and check this again.



I have tried to replicate your folder structure and all your route and controller syntax,

and I found something interesting.



PHP Code:
$routes->match(['get','post'], 'admin/translations/(: segment)''admin/Translations::translate/$1');  --> not working(404)
$routes->match(['get','post'], 'admin/translations/(: segment)''admin\Translations::translate\$1');  --> not working(404)
$routes->match(['get','post'], 'admin/translations/(: segment)''admin\Translations::translate/$1');  --> working 

Yet
PHP Code:
$routes->match(['get','post'], 'admin/translations/someVar''admin/Translations::translate/someVar'); --> working
$routes
->match(['get','post'], 'admin/translations/someVar''admin\Translations::translate/someVar'); --> working 


I just relize the difference between your code and my code is this \ and / that being used.
If no variable is being used, using / is fine but if there is variable / will resulting in 404 and only \ works.
Reply


Messages In This Thread
RE: Problem with routes if Controller is in a subfolder - by inumaru - 07-03-2020, 09:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB