Exemple #1
0
 /**
  * @param $quizz
  * @param $question
  */
 public function storeUnansweredQuestion($quizz, $question)
 {
     $score = new Score();
     $score->user()->associate(Auth::user());
     $score->quizz()->associate($quizz);
     $score->question()->associate($question);
     $score->setAttribute('answer_id', null);
     $score->setAttribute('already_answered', false);
     $score->setAttribute('correct', null);
     $score->save();
 }