Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Get better auto-complete from your factories

What is that factory docblock actually doing?

Joel Clermont
Joel Clermont
2026-06-12

From our daily Laravel tips email. Get the next one in your inbox.

In recent versions of Laravel, every factory you scaffold comes with an @extends docblock above the class. It wasn't always there in Laravel's history, but it's there now, and it can be tempting to just blindly accept it without understanding why it's there.

In today's video, I will delete one to see what, if anything, will break.

Watch Now (5 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. If your app started before these docblocks were the default, it's probably missing a few other modern niceties too. Get a Laravel code review.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.