コード例 #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     $generator = FileGenerator::make($this->getRootDirectory(), $this->getStubDirectory());
     if ($this->generate($generator) === false) {
         return false;
     }
     $this->info($this->type . ' created successfully.');
 }
コード例 #2
0
 /**
  * @param string $path
  * @param string $type
  * @param array  $properties
  */
 public function generateAddon($path, $type, array $properties)
 {
     $generator = FileGenerator::make($path, __DIR__ . '/../stubs/' . $type);
     $method = 'generate' . studly_case($type);
     call_user_func([$this, $method], $generator, $properties);
 }