In the next lessons, we will use built-in Livewire testing tools to test Livewire components.
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...