![]() |
Parameter passing through routing problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Parameter passing through routing problem (/showthread.php?tid=78545) |
Parameter passing through routing problem - csbb - 02-05-2021 I have a little routing problem, that i can't solve in Codeigniter 4. I try adding a parameter at deleting list item. But get the following error messages. > Error message at post routing: Controller or its method is not found: > \App\Controllers\Userfeed::delete > Error message at add or get routing: Controller or its method is not found: > \App\Controllers\Pages::index the route part: Code: [color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]//$routes->add('userfeed/(:any)', 'Pages/UserFeed::delete');//this works fine[/font][/size][/color] the controller: Code: namespace App\Controllers\Pages; the view part: Code: .... If need more information let it with me know. Thanks your help! ![]() RE: Parameter passing through routing problem - csbb - 02-07-2021 Thank God the problem is solved! ![]() The problem was the forward slash. This is working now. ![]() $routes->add('userfeed/delete/(:any)', 'Pages\Userfeed::delete/$1'); |