From superpowers-laravel
Guides Laravel migrations and factories with safe schema change rules, model pairing, seeding practices, and DB testing using RefreshDatabase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-laravel:migrations-and-factoriesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Keep schema changes safe, testable, and reversible.
Keep schema changes safe, testable, and reversible.
# Create model with migration + factory
sail artisan make:model Post -mfc # or: php artisan make:model Post -mfc
# Run/rollback
sail artisan migrate # or: php artisan migrate
sail artisan migrate:rollback --step=1 # or: php artisan migrate:rollback --step=1
# Fresh DB (dangerous; dev only)
sail artisan migrate:fresh --seed # or: php artisan migrate:fresh --seed
main, never edit it—add a new one->state([...])) over boolean flagsbelongsTo) in factories to build realistic graphsRefreshDatabasenpx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelLaravel 12 database migrations - Schema Builder, columns, indexes, foreign keys, seeders. Use when designing database schema or managing migrations.
Establishes patterns for test factories, fixtures, database seeding, and test data isolation to decouple tests from specific database states.