Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Iseed Laravel Package

orangehill/iseed

Inverse seed generator for Laravel: create seed files from existing database tables. Run php artisan iseed with one, several, or all tables, with optional class name prefixes and suffixes to avoid overwriting existing seeders. Supports Laravel 8-13.

View on GitHub
Deep Wiki
Context7

orangehill/iseed is a Laravel package that reverses the usual seeding workflow: rather than writing seed files by hand, it generates a new seed file from the data already stored in your database tables. Point the Artisan command at one or more tables (php artisan iseed my_table,another_table) and it produces ready-to-run seeder classes.

  • Generate a seeder for a single table, a comma-separated list, or every table in the database.
  • classnameprefix / classnamesuffix options create extra seeders without overwriting existing ones.
  • Supports Laravel 8 through 13 (PHP 8.0+) with automatic service provider discovery.
Frequently asked questions about Iseed
How do I install orangehill/iseed in a Laravel app?
Run composer require orangehill/iseed, or composer require --dev orangehill/iseed if you want to keep it out of production dependencies. Laravel 5.5 and newer auto-discover the service provider. On Laravel 5.4 and older you must manually add Orangehill\Iseed\IseedServiceProvider::class to the providers array in config/app.php.
Which Laravel and PHP versions does orangehill/iseed support?
The package supports Laravel 8, 9, 10, 11, 12, and 13 on PHP 8.0 or higher. Older Laravel lines require pinned package versions, such as 2.2 for Laravel 5.3.7 and below or 1.1 for Laravel 4. Check the version constraints before upgrading a legacy application.
How do I generate a seeder for one table with iSeed?
Run php artisan iseed table_name from your Laravel project root. iSeed reads the table through your configured database connection and writes a seeder class into database/seeders. Use the exact table name, and add flags such as --max or --where if you need to limit the exported rows.
Can iSeed generate seeders for multiple tables or every table?
Yes. Pass a comma-separated list, such as php artisan iseed users,posts,comments, to generate one seeder per table. If you omit the table argument, iSeed discovers all tables in the database and generates a seeder for each one. That all-tables mode is convenient for local fixtures but risky if sensitive data exists.
How do I create another seeder without overwriting an existing one?
Use --classnameprefix or --classnamesuffix to change the generated class and file name. For example, php artisan iseed users --classnameprefix=Customized writes CustomizedUsersSeeder.php instead of UsersSeeder.php. This lets you keep an existing seeder while adding a separate fixture set.
Is it safe to run iSeed against a production database?
iSeed itself reads data to generate files, but the generated seeders can contain literal emails, hashed passwords, API tokens, and customer records. Running those seeders later against a non-local database can also delete and replace real rows. Restrict iSeed to local or controlled CI environments and enforce a PII scrubbing policy with --exclude, --where, or --max before committing generated files.
Why does a generated iSeed seeder delete table data before inserting?
Generated run methods commonly begin with a DB::table('table')->delete() call so the seeder can recreate a clean fixture state. That is destructive if db:seed is pointed at staging or production. Add environment guards and never run generated seeders against a database whose data you cannot lose.
Can iSeed handle large tables without running out of memory?
iSeed supports chunked inserts with --chunksize, defaulting to 500 rows, plus --max, --skip, --where, and --orderby to limit the export. Chunking reduces insert memory pressure, but generated file size and PHP memory still grow with row count and column width. For very large or PII-heavy tables, export a filtered subset rather than the full table.
Does iSeed work with MySQL, PostgreSQL, and SQLite?
iSeed uses Laravel's database layer to read tables, so it can work across supported Laravel connections. Some generated flags are dialect-specific: --skip-fk-checks emits MySQL SET FOREIGN_KEY_CHECKS, and --reset-sequences emits PostgreSQL setval calls. If local, CI, and staging use different engines, test the generated SQL and avoid assuming identical behavior.
Should I install orangehill/iseed as a dev dependency?
Yes. Treat it as a development-time scaffolding tool and install it with composer require --dev orangehill/iseed so it stays out of production dependencies. It can also modify database/seeders/DatabaseSeeder.php to register generated seeders, so review that file for merge conflicts and keep the marker comments intact.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo