Skip to content

Importing messages from \Phalcon\Mvc\Model

Dylan Anderson edited this page Nov 25, 2016 · 2 revisions

Sometimes you'll want to display the raw error messages generated by your models. You can do so with Feedback::importMessages(). Simply pass the model object as the sole parameter, and all messages will be imported into Feedback as "error" messages. Messages you've already created will remain - this method just appends messages, it doesn't overwrite them.

You can optionally send a type and namespace string as the second parameter:

Feedback::importMessages($Model,'error.saving');