Пример #1
0
 /**
  * Adds an expert response to a question. This action has the effect of generating an email to the person asking
  * the questions as well as setting the question state to read + responded for this expert
  *
  * @param $questionId
  * @param $expertUserName
  * @param $responseText
  *
  * @return \Responses
  */
 public function addResponse($questionId, $expertUserName, $responseText)
 {
     $response = new \Responses();
     $response->setQuestionId($questionId);
     $response->setExpert($expertUserName);
     $response->setResponse($responseText);
     $response->save();
     return $response;
 }