I'm having trouble showing flash messages with Phalcon PhP. Here is how I register the service:
use Phalcon\Flash\Direct as Flash;
$di->set('flash', function () {
return new Flash(array(
'error' => 'alert alert-danger',
'success' => 'alert alert-success',
'notice' => 'alert alert-info',
'warning' => 'alert alert-warning'
));
});
In my controller I add the flash message like this
$this->flash->success('The carrier was successfully activated');
In my view I try to show like this (volt):
{{ flash.output() }}
My layout has the {{ content() }}
tag and I have tried to apply the discussed in this post but it doesn't work anyway.
Can you see what I'm missing here? Thanks for any help!