Ejemplo n.º 1
0
 /**
  * Run seeds on a module
  *
  * @param ModuleContainerInterface $module
  * @param array                    $data
  *
  * @return $this
  */
 public function seedModule(ModuleContainerInterface $module, array $data = [])
 {
     $className = $module->getNamespace() . '\\database\\seeds\\DatabaseSeeder';
     if (!class_exists($className)) {
         return false;
     }
     $seeder = app($className, $data);
     $seeder->run();
     $this->output(sprintf('<info>Seeded %s</info> ', $module));
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * @param ModuleContainerInterface $module
  */
 public function registerModule(ModuleContainerInterface $module)
 {
     $this->registeredModules[$module->getName()] = $module;
 }