1.0
Featured Mar 27, 2026
Laravel Seed Migrations
Version 1.0 released Mar 27, 2026.
The Problem
Laravel's built-in db:seed command re-runs everything every time. There's no way to track which seeders have already run — making it unreliable for production deployments, CI/CD pipelines, and team environments where seed data needs to be pushed once and only once.
The Solution
laravel-seed-migrations gives you versioned seeders — each one runs exactly once, tracked in a database table, just like migrations. If it's already run, it won't run again.
Installation
composer require mahbuburriad/laravel-seed-migrations
php artisan migrate
Basic Usage
Create a versioned seeder:
php artisan seed:make 1.0 --desc="Initial settings"
Run pending seeders:
php artisan seed:migrate
Check status:
php artisan seed:status
Rollback:
php artisan seed:rollback
Dry run (preview without executing):
php artisan seed:migrate --dry-run
Commands
| Command | Description |
|---|---|
seed:make {version} |
Create a new versioned seeder |
seed:migrate |
Run all pending versions |
seed:migrate --seed-version=x.x |
Run a specific version only |
seed:migrate --dry-run |
Preview without running |
seed:rollback |
Roll back the last version |
seed:rollback --seed-version=x.x |
Roll back a specific version |
seed:rollback --force |
Roll back without confirmation prompt |
seed:status |
Show all versions and their run status |
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
License
MIT © Mahbubur Riad
Changelog
v1.0 — 2026-03-27
- Initial release
- Versioned seeder system with database tracking table
- seed:make command to generate versioned seeder files
- seed:migrate command to run pending versions only
- seed:rollback command with version targeting and --force flag
- seed:status command with tabular output
- Dry-run mode for safe previewing
- Semantic version ordering
- CI/CD safe — exits cleanly when nothing is pending
- Configurable table name and seeder path
- Supports Laravel 10, 11, 12 and PHP 8.1+