Hi everyone, I am creating a REST API (keeping the MVC layer) and what I want to manage is to have a routing rule that give me the capability to write my action like this
public function createAction($data)
{
echo "<pre>" . __METHOD__ . "</pre>";
var_dump($data);
exit;
}
So I would like to get all the POST data as the action argument. I've tried different combination but without success, below my current code that is not working for POST calls
$router->add("/user", array(
'module' => 'user',
'controller' => 'rest',
'action' => 'create',
'data' => ':params' // how to write correctly this?
))->via(array("POST"));
Any idea to solve this?
Thanks