Scan additional folders for modules not working with database seeders
I followed this documentation to add additional folders for modules. I enabled scan->enabled to true, added autoload to composer.json, created module inside folder Connectors\Thalias, and enabled module.
I created a seeder inside Database\Seeders, then I ran the command: php artisan module:seed Thalias.
Terminal return success, but the seed is not running.
So I had to run the command: "php artisan db:seed --class=Connectors\\Thalias\\Database\\Seeders\\ThaliasDatabaseSeeder" manually.
How to fix this issue? thanks.
I face the same matters
What I did is to add the seeder insider the existing seeder inside the module e.g
namespace Modules\User\Database\Seeders;
use Modules\User\Database\Seeders\BouncerDataSeeder;
use Illuminate\Database\Seeder;
class UserDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Call the BouncerDataSeeder from the User module
$this->call(BouncerDataSeeder::class);
}
}
https://github.com/nWidart/laravel-modules/issues/465#issuecomment-892680947