eighty8 / laravel-seeder

Versioned, environment-based Seeders in Laravel
18 stars 16 forks source link

Add support for multiple paths for seeders #22

Closed renepardon closed 4 years ago

renepardon commented 4 years ago

Hello,

thanks so far for this great library! I would like to be able to use it "easy way" in combination with nWidart modules. Every module inside the "Modules/" directory has it's own "database/" directory which contains corresponding migrations, seeds, factories. Would be nice if I can place the incremental seeders inside every module as instead of just the "database/seeders/" directory.

So within the configuration it should be possible to add multiple paths to seeders. Within the AbstractSeedMigrationCommand class there is a method called resolveMigrationPaths. It would be nice to have the array of paths merged by calling addMigrationPath for all of the configured paths (modules) as well.

nikocraft commented 4 years ago

plus

renepardon commented 4 years ago

looks like this repository is dead. I took over and implemented this feature. I also changed code style to PSR-12 and increased the requirements to PHP 7.4 and laravel 7.

https://packagist.org/packages/renepardon/laravel-seeder

@nikocraft

nikocraft commented 4 years ago

Good news, thanks for tagging me, I'll take a look at your fork! 👍