id = isset($value["id"]) ? $value["id"] : 0; if(isset($value["errors"])) { foreach ($value["errors"] as $errors) { foreach ($errors['messages'] as $message) { $model->addError($errors['code'], $message); } } } return isset($value['status']) && $value['status'] == 'success'; } }