Skip to content

QuestionTypeSeeder error #16

@alex1897

Description

@alex1897

Hi,

I found that the migration for the QuestionTypeSeeder throws an error.
Bildschirmfoto 2022-07-22 um 14 46 32

From my knowledge the create() supports only one record. The insert() supports many records but does not automatically update the timestamps. One option would be:

$questionTypes = [
            [
                'name' => 'multiple_choice_single_answer',
            ],
            [
                'name' => 'multiple_choice_multiple_answer',
            ],
            [
                'name' => 'fill_the_blank',
            ]
        ];

        foreach ($questionTypes as $questionType) {
            QuestionType::create($questionType);
        };

All the best
Alex

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions