示例#1
0
 /**
  * Get module.
  *
  * @param  string  $name
  * @return \Simexis\Modulator\Modules\Module|null
  */
 protected function getModule($name)
 {
     if (!$name) {
         return null;
     }
     return $this->module->findOrFail(strtolower($name));
 }
示例#2
0
 /**
  * Get master database seeder name for the specified module.
  *
  * @param string $name
  *
  * @return string
  */
 public function getSeederName($name)
 {
     $module = $this->module->findOrFail($name);
     $path = $module->getExtraPath('Database/Seeders/DatabaseSeeder.php');
     if (!is_file($path)) {
         return null;
     }
     $namespace = $module->getNamespace();
     return $namespace . '\\Database\\Seeders\\DatabaseSeeder';
 }