I am developing a package which creates several migrations, which I would like to seed. Then there are some other subpackages, which could also create migrations with seeds. So there can be a lot of seeds around, and I don't want to force users to add tens of lines to DatabaseSeeder.
Something like php artisan db:seed --class="MyNamespace\\DatabaseSeeder" would work, but this way users can't migrate and seed with the same command, as php artisan migrate --seed doesn't accept the class option.
Basically, I am looking for something similar to loadMigrationsFrom() of the ServiceProvider class.
Any help would be appreciated.
UPDATE: I'm primarily interested in a solution for Laravel 5.3, I'll somehow figure out backward compatibility
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire