/**
  * Get the path to the module.
  *
  * @param string $slug
  *
  * @return string
  */
 protected function getModulePath($slug = null, $allowNotExists = false)
 {
     if ($slug) {
         return $this->module->getModulePath($slug, $allowNotExists);
     }
     return $this->module->getPath();
 }
Esempio n. 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $slug = $this->parseSlug($this->argument('slug'));
     $name = $this->parseName($this->argument('name'));
     if ($this->module->exists($slug)) {
         $this->modulePath = $this->module->getPath();
         $this->moduleInfo = collect($this->module->where('slug', $slug));
         $this->container['slug'] = $slug;
         $this->container['name'] = $name;
         return $this->generate();
     }
     return $this->error('Module ' . $this->container['slug'] . ' does not exist.');
 }