예제 #1
0
 /**
  * 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();
 }
예제 #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)->first());
         $this->container['slug'] = $slug;
         $this->container['name'] = $name;
         return $this->generate();
     }
     return $this->error('Module ' . $this->container['slug'] . ' does not exist.');
 }
예제 #3
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)) {
         $module = $this->module->where('slug', $slug);
         $this->modulePath = $this->module->getPath();
         $this->moduleInfo = collect($module);
         $this->container['slug'] = $slug;
         $this->container['name'] = $name;
         return $this->generate();
         event($slug . '.module.made.' . strtolower($this->type), [$module, $this->option()]);
     }
     return $this->error('Module ' . $this->container['slug'] . ' does not exist.');
 }