/** * Show seed infomation. * * @param \Jumilla\Versionia\Laravel\Migrator $migrator */ protected function showSeeds(Migrator $migrator) { $this->line('<comment>Seeds</comment>'); $seeds = $migrator->seedNames(); if (count($seeds) > 0) { $default_seed = $migrator->defaultSeed(); foreach ($seeds as $seed) { $class = $migrator->seedClass($seed); $status_mark = ' '; $default_mark = $seed == $default_seed ? '(default)' : ''; if (!class_exists($class)) { $this->line("{$status_mark} <info>[{$seed}]</info> <error>{$class}</error>"); $this->line(''); $this->error('Error: Class not found.'); continue; } $this->line("{$status_mark} <comment>{$default_mark}</comment><info>[{$seed}]</info> {$class}"); } if ($default_seed && !in_array($default_seed, $seeds)) { $this->line(''); $this->error("Error: default seed '{$default_seed}' is not defined."); } } else { $this->info('Nothing.'); } $this->line(''); }