コード例 #1
0
 /**
  * Saves an answer to the database, for the specified vote type
  *
  * @param $answer   The answer to save to database
  * @param $vtid     ID of the vote type that this answer belongs to
  */
 public function saveVoteTypeAnswer($answer, $vtid)
 {
     if ($answer != '') {
         VoteTypeAnswer::create(['type' => $vtid, 'answer' => $answer]);
     }
 }