Seeder

Seeder

Bootraiser supports the Laravel Seeder with the Model Factory. To be able to use the seeders from a package, “migrations” must be activated in Bootraiser.

If you want to run Seeder from packages, use the following command:

php artisan bootraiser:seed

You will see a list of all seeds in all packages that use Bootraiser with the “Migrations” option used

laravel-list-seeder.webp

The actually executed laravel-command is displayed as an additional hint. Especially during the test and development phase, it will be easier to execute seeder directly via the cli.

laravel-seeder-cli-package

php artisan db:seed "YourVendor\YourPackage\Database\Seeders\NiceModelSeeder"

Todo:

Seeder for package

make selectable which seeders

References

https://laravel.com/docs/11.x/seeding

https://laravel.com/docs/11.x/eloquent-factories

Last updated on