From 0cd498649a79246d93b0b1c4ec5654a3508b2608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nil=20K=C3=A9sede?= Date: Wed, 4 Nov 2015 01:51:07 -0300 Subject: [PATCH] Fix the module without seed class issue --- Commands/SeedCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Commands/SeedCommand.php b/Commands/SeedCommand.php index 0c9e787..66722b7 100644 --- a/Commands/SeedCommand.php +++ b/Commands/SeedCommand.php @@ -57,9 +57,11 @@ public function fire() continue; } - $this->dbseed($name); + if (class_exists($this->getSeederName($name))) { + $this->dbseed($name); - $this->info("Module [$module] seeded."); + $this->info("Module [$module] seeded."); + } } return $this->info('All modules seeded.'); @@ -98,7 +100,7 @@ public function getSeederName($name) $namespace = $this->laravel['modules']->config('namespace'); - return $namespace.'\\'.$name.'\Database\Seeders\\'.$name.'DatabaseSeeder'; + return $namespace.'\\'.$name.'\Database\Seeders\\'.$name.'TableSeeder'; } /**