Phalcon PHP Ajax错误模型

When i'm trying to save my model like this if( !$myModel->save() ) I have to surround in try catch my condition if I want to get the errors messages... I can't check if the save() is false, because this will not returns the errors.

How can I do to get $myModels->getMessages() without using try catch ?

I want to do like this example and return json_encode if the save doesn't work.

查看全部
weixin_33695450
weixin_33695450
2016/05/09 13:21
  • php
  • ajax
  • 点赞
  • 收藏
  • 回答
    私信

1个回复