Also called: db:seed, fake data
Example
The factory created fifty fake leads so I could test the admin list.
In code
php artisan db:seed
php artisan migrate:fresh --seed # local only: drops all tables
Lead::factory()->count(20)->create();
Learn more
- Database: SeedingLaravel docs (opens in a new tab)
- Eloquent: FactoriesLaravel docs (opens in a new tab)
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30