Manually writing seeders that produce realistic, varied data is a chore — you end up with the same five test users and three orders every time. Claude can generate a full seeder in seconds just from a description of your models.
Create a Laravel seeder that generates:
- 50 users with realistic names, emails, and hashed passwords
- Each user has 1–5 blog posts in various states (draft, published, archived)
- Posts have realistic titles, slugs, and body content
- Include a mix of timestamps spanning the last 2 years
Claude generates seeders using Faker for any framework — Laravel, Django, Rails, or plain SQL. It understands relationships and will maintain referential integrity across tables.
User::factory(50)->create()->each(function ($user) {
Post::factory(rand(1, 5))->create([
'user_id' => $user->id,
'status' => fake()->randomElement(['draft', 'published', 'archived']),
'created_at' => fake()->dateTimeBetween('-2 years', 'now'),
]);
});
If your models have complex validation rules, paste them into the prompt — Claude will respect constraints like unique emails, valid enum values, and foreign key relationships automatically.
Realistic seed data surfaces edge cases in your UI that a handful of test rows never would.
Log in to leave a comment.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.