I'm trying to get the project id from the url using the router. Let's say this is my URL: https://boardash.test/tasks/all/7 And I want to get the 7 in my controller.
I created a router using this:
$router->add('/tasks/:action/{project}', ['controller' => 'tasks', ':action' => 1]);
And try to access it using:
$this->dispatcher->getParam('project')
But when I var_dump() this, it returns null
What am I missing?