Exemplo n.º 1
0
 public function handle()
 {
     $name = $this->ask('Directory name');
     $displayName = $this->ask('Display name');
     $name = Str::slugify($name);
     $this->generate($name, ['config.php.stub' => 'config.php'], ['displayName' => $displayName]);
     $this->comment('All done sire!');
 }
Exemplo n.º 2
0
 protected function write($content, $name = null)
 {
     $tmpDir = storage_path('blade-extensions');
     if (!$this->files->exists($tmpDir)) {
         $this->files->makeDirectory($tmpDir);
     }
     if (is_null($name)) {
         $name = Str::slugify($this->viewPath) . '__' . uniqid(time(), true);
     }
     $path = Path::join($tmpDir, $name);
     $this->files->put($path, $content);
     return [$name, $path];
 }