Пример #1
0
 public function getQuizQuestion($quizId, $quizQuestionId)
 {
     return Quizquestion::where(array('quiz_id' => $quizId, 'question_id' => $quizQuestionId))->first();
 }
Пример #2
0
 public function getQuizQuestion($quizId, $quizQuestionId = null)
 {
     if (is_null($quizQuestionId)) {
         return Quizquestion::where(array('quiz_id' => $quizId))->get();
     } else {
         return Quizquestion::where(array('quiz_id' => $quizId, 'question_id' => $quizQuestionId))->first();
     }
 }