Skip to main content

In this last lesson, we will have another test for Quizzes form.

As always we need a factory.

php artisan make:factory QuizFactory

database/factories/QuizFactory.php:

use Illuminate\Support\Str;
 
class QuizFactory extends Factory
{
public function definition(): array
{
$title = $this->faker->sentence();
$slug = Str::slug($title);
 
return [
'title' => $title,
'slug' => $slug,
'description' => fake()->paragraph(),
'published' => false,
'public' => false,
];
}
}

And the feature test...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 09 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

AA
Ali Al Qahtani ✓ Link copied!

Nice course and helpful 👍

Thanks 🌹

M
mujab ✓ Link copied!

thanks

RB
Rajesh Budhathoki ✓ Link copied!

Can you upgrade this course for Livewire v3?

C
Cedasie ✓ Link copied!

Thank you.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.