We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Vokuro Model Email Notice

In vokuro, on registering a user, a mail is sent from the model's aftersave() method which has the following code.

$this->getDI()->getFlash()->notice('A confirmation mail has been sent to ' . $this->email);

This does not obey the template and shows this message in a blank page.

I want this notification in my controller where the $user->save() is called, and from there i want to show the message as done in the model.

Any help will be appreciated.



32.3k
Accepted
answer

Hi @assadnazar the flash services show messages in the same request and you can print it using echo content() in you view. If you use flashSession service, messages are stored in session until you print it using echo flashSession->output().

More info flash services

Good luck