Hi! I'm using phalcon Version => 2.0.9 Build Date => Jan 7 2016 13:53:17 Powered by Zephir => Version 0.8.0a
This is my code, and is almost equal to another controller where it works perfectly:
// $this->view->disable();
if ($deleted) {
$this->flash->success('User was deleted successfully');
} else {
$this->flash->success('You cant delete this user');
}
// $this->view->disable();
$this->response->redirect('admin/users');
return;
In my index.php I have:
// Flash Data (Temporary Data)
$di->set('flash', function() {
$flash = new \Phalcon\Flash\Session([ // cosas de Bootstrap
'error' => 'alert alert-danger',
'success' => 'alert alert-success',
'notice' => 'alert alert-info',
'warning' => 'alert alert-warning'
]);
return $flash;
});
And in my view(volt):
...more code...
</div>
{{ flash.output() }}
{% block content %}
{% endblock %}
</body>
</html>
In my DashboardController.php this code works perfectly and show the messages in a green or red background. But when I use those messages in my AdminController.php the background shows with the right color but no message is displayed.
I think I didn't touched anything, because my AdminController, with his views is almost a copy of the another but with more capabilities. What I'm doing wrong? Thanks in advance.