Hi, cannot understand how to make the "automatic" filtering work on my controller.
I have a Phalcon project with 2 different modules: Backend and Frontend.
I configured it just like the example on the website and it works perfectly.
In my public/index.php
I added the following:
$di = new FactoryDefault();
(...)
$di->set('filter', function() {
return new \Phalcon\Filter();
});
(...)
I was sure this was enough to enable filtering in my controllers... But when from inside a controller I try to read variable that comes from a POSTed HTML form:
$issue->name = $request->getPost("name", "alphanum");
I get
A dependency injection object is required to access the 'filter' service
Anyone has any idea on what I am doing wrong? I can't find anything online. Thanks in advance, Simone