"admin", 'email' => "admin@admin", 'password' => Hash::make("admin"), 'role' => "admin" ]); $teacher = User::create([ 'name' => "Bob teacher", 'email' => "bob@teacher", 'password' => Hash::make("bob"), 'role' => "teacher" ]); User::create([ 'name' => "Alice student", 'email' => "alice@student", 'password' => Hash::make("alice"), 'role' => "student" ]); $test = Test::create([ "name" => "Matematika", "user_id" => $teacher->id ]); { $question = Question::create([ "test_id" => $test->id, "question" => "1+1=?", "answer_type" => "single_answer", ]); SingleQuestionAnswers::create([ "question_id" => $question->id, "answer" => "2" ]); } { $question = Question::create([ "test_id" => $test->id, "question" => "Gyvenimo prasme", "answer_type" => "single_choice", ]); SingleChoiceAnswer::create([ "question_id" => $question->id, "correct_answer" => "42", "incorrect_answer1" => "Kates", "incorrect_answer3" => "Sunys", ]); } { $question = Question::create([ "test_id" => $test->id, "question" => "Siandienos orai", "answer_type" => "multiple_choice", ]); MultipleChoiceAnswers::create([ "question_id" => $question->id, "answer1" => "Sninga", "is_answer1_correct" => true, "answer2" => "Lija", "is_answer2_correct" => true, "answer4" => "Idk, paziurek per langa", "is_answer4_correct" => false, ]); } } }