orchestral / canvas

Code Generators for Laravel Applications and Packages
https://packagist.org/packages/orchestra/canvas
MIT License
187 stars 12 forks source link

adds make:seeder to canvas command #13

Closed rbarden closed 3 years ago

rbarden commented 3 years ago

This adds the make:seeder command available during package development when calling ./vendor/bin/canvas make:seeder ... which currently fails because it is not defined.

The tests pass because they are not using this file to run commands.

crynobone commented 3 years ago

@rbarden I didn't add it since I'm not sure where it should be loaded for package development. It would be weird to use database/seeders as it's not loaded by default.

crynobone commented 3 years ago

You can however add it easily using canvas.yaml

preset: package

generators:
  - Orchestra\Canvas\Commands\Database\Seeder
rbarden commented 3 years ago

In my case, I use seeders to setup the database before running tests (along with factories), as well as a package might need to seed the database upon installation to a project.