Welcome Guest, Not a member yet? Register   Sign In
Routing with parametars problem
#1

Hi,
I asked this on stackoverflow but decided that this is better place to ask for help, so my problem is this:
When I need to take parameter from URI I just can't make my route works.
So this is what I have in route.php
Code:
$routes->add('admin', 'Admin/Login::index');
$routes->add('admin/login', 'Admin/Login::login');
$routes->add('admin/gUP', 'Admin/AdminGlavni::g_obrada');
$routes->add('admin/cam', 'Admin/AdminGlavni::cam_prikaz');
$routes->add('admin/cam/edit/(:any)', 'Admin/AdminGlavni::cam_edit_show/$1');
but this is not working (all other routes works as they should)
Code:
$routes->add('admin/cam/edit/(:any)', 'Admin/AdminGlavni::cam_edit_show/$1');
When I try to reach mydmain.com/admin/cam/edit/1 I get:
Quote:404 - File Not Found
Controller or its method is not found: \App\Controllers\Admin::index
and cam_edit_show in AdminGlavni Class is defined like this:
Code:
public function cam_edit_show($id) {
                ......

            }
What is wrong whit my route? Please help.


In meant time I got suggestion to disable autoRoute but that didn't help at all.
Reply


Messages In This Thread
Routing with parametars problem - by Didytz - 04-08-2022, 07:09 AM
RE: Routing with parametars problem - by iRedds - 04-08-2022, 07:35 AM
RE: Routing with parametars problem - by Didytz - 04-08-2022, 08:26 AM
RE: Routing with parametars problem - by iRedds - 04-08-2022, 08:39 AM
RE: Routing with parametars problem - by Didytz - 04-08-2022, 08:44 AM
RE: Routing with parametars problem - by iRedds - 04-08-2022, 10:23 PM
RE: Routing with parametars problem - by kenjis - 04-08-2022, 05:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB