Welcome Guest, Not a member yet? Register   Sign In
Bug in routes with path in controller
#1

Hi, Routes with pass parameters such as the following:
$routes->get('/movie/test/(:any)', 'dashboard/MovieController::test/$1');

They only work if the controller (for example MovieController) is in the root:
$routes->get('/movie/test/(:any)', 'MovieController::test/$1');



In the first case ($routes->get('/movie/test/(:any)', 'dashboard/MovieController::test/$1');) the error it gives is the following

[font=Tahoma, Verdana, Arial, sans-serif]404 - File Not Found
[/font]
Controller or its method is not found: \App\Controllers\dashboard::index


It does not recognize the controller according to the error it throws; But if I remove the dasboard from the configuration like:

$routes->add('movie/test/(:any)', 'MovieController::test/$1');

its working
Reply


Messages In This Thread
Bug in routes with path in controller - by acy29 - 11-22-2019, 05:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB