/**
  * Handle the command.
  *
  * @param Filesystem  $filesystem
  * @param Application $application
  * @return string
  */
 public function handle(Filesystem $filesystem, Application $application)
 {
     $reference = $this->command->option('shared') ? 'shared' : $application->getReference();
     $path = base_path("addons/{$reference}/{$this->vendor}/{$this->slug}-{$this->type}");
     $modulePath = __DIR__ . '/../../../resources/assets/module';
     $data = $this->getTemplateData();
     /* Make module's folder */
     $filesystem->makeDirectory($path, 0755, true, true);
     /* Copy module template files */
     $filesystem->parseDirectory($modulePath . "/template", $path . '/', $data);
     return $path;
 }