/** * 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.'); }
/** * @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); }