I'm building my link like this:
$this->Html->link(
$this->Icon->fa('plus'),
['controller' => 'Questions', 'action' => 'add', $questionnaire->id],
[
'title' => 'Add'
]
);
This creates the desired icon on my browser, with this link:
<host>/questionnaire/questions/add/2
On the "other side", by using for example
$this->request->getParam('action')
I can correctly get "add" as a value.
But how can I access the 2, so the last part of the url?
I've tried with
$this->request->getQueryParams()
and it returns an empty array.