示例#1
0
 /**
  * Get a module's manifest contents.
  *
  * @param string $slug
  *
  * @return Collection|null
  */
 public function getManifest($slug)
 {
     if (is_null($slug)) {
         return;
     }
     $module = Str::slug($slug);
     $path = $this->getManifestPath($module);
     $contents = $this->files->get($path);
     $collection = collect(json_decode($contents, true));
     return $collection;
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->container['slug'] = Str::slug($this->argument('slug'));
     //
     $slug = $this->container['slug'];
     $this->container['name'] = Str::studly($slug);
     $this->container['namespace'] = Str::studly($slug);
     $this->container['version'] = '1.0';
     $this->container['description'] = 'This is the description for the ' . $this->container['name'] . ' module.';
     $this->container['license'] = 'MIT';
     $this->container['author'] = 'John Doe';
     $this->container['email'] = '*****@*****.**';
     $this->container['homepage'] = 'http://www.novaframework.dev';
     if ($this->option('quick')) {
         return $this->generate();
     }
     $this->stepOne();
 }
示例#3
0
 /**
  * Parse slug name of the module.
  *
  * @param string $slug
  *
  * @return string
  */
 protected function parseSlug($slug)
 {
     return Str::slug($slug);
 }