I'm getting into trouble with passing paramters by URL in Zend Framework.
For example, I have a Controller like this:
class MyController extends AbstractActionController {
public function indexAction() { ... }
public function updateAction($id) { ... }
}
I want to access the update page by a URL like this: http://example.com/mycontroller/update/1
So how to pass the value 1 to the controller?
Can anyone help me? Thanks a lot.
BTW, I have changed the default router from
'route' => '/[:controller[/:action]]'
to
'route' => '/[:controller[/:action[/:id]]]',
but it still doesn't work. And here's the error message below.
Warning: Missing argument 1 for Module\Controller\MyController::updateAction() call in ...