Courses

Creating a Quiz System with Laravel 10 + Livewire 3: Step-by-Step

In the next lessons, we will use built-in Livewire testing tools to test Livewire components.

questions tests

The first one will be for the Questions, so first we need the Question factory.

php artisan make:factory QuestionFactory

database/factories/QuestionFactory.php:

class QuestionFactory extends Factory
{
public function definition(): array
{
return [
'question_text' => fake()->paragraph(),
];
}
}

Because Questions needs an option we need to create a factory for the QuestionOption Model...

This lesson is only for Premium Members.
Want to access all lessons of this course?

You also get:

  • 60 courses (1084 lessons, 42 h 44 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord