Exemplo n.º 1
0
 public function next()
 {
     $id = $this->property('id');
     $question_id = $this->property('question');
     $quiz = QuizModel::find($id);
     $questions = $quiz->questions;
     if ($question_id == 'random') {
         return 'random';
     }
     if (count($questions) > $question_id) {
         return $question_id + 1;
     }
 }
Exemplo n.º 2
0
 public function quiz()
 {
     return QuizModel::find($this->property('id'));
 }
Exemplo n.º 3
0
 public function quizzes()
 {
     return Quiz::all();
 }