URL routing for methods with parameters leads to 404 error |
Hello everyone,
I'm an experienced codeigniter 3 user trying to transition into codeigniter 4, and i have this issue that has been bugging me all day. Below is a route defined for a class Access_control with method sign_in_page that accepts a parameter Code: $routes->get('/control_panel/sign_in/(:any)', 'Admin_portal/Access_control::sign_in_page/$1'); without the parameter , the page loads fine , but the moment you add the (:any) parameter , it shows the error below : 404 - File Not Found Controller or its method is not found: \App\Controllers\Admin_portal::index However , if you visit the actual link directly , the page works fine , what could be the problem?
|
Welcome Guest, Not a member yet? Register Sign In |