/**
  * Execute the console command.
  */
 public function fire()
 {
     /*
      * Extract the author and name from the plugin code
      */
     $pluginCode = $this->argument('pluginCode');
     $parts = explode('.', $pluginCode);
     $pluginName = array_pop($parts);
     $authorName = array_pop($parts);
     $destinationPath = base_path() . '/plugins/' . strtolower($authorName) . '/' . strtolower($pluginName);
     $controllerName = $this->argument('controllerName');
     /*
      * Determine the model name to use,
      * either supplied or singular from the controller name.
      */
     $modelName = $this->option('model');
     if (!$modelName) {
         $modelName = Str::singular($controllerName);
     }
     $vars = ['name' => $controllerName, 'model' => $modelName, 'author' => $authorName, 'plugin' => $pluginName];
     Controller::make($destinationPath, $vars, $this->option('force'));
     $this->info(sprintf('Successfully generated Controller and views for "%s"', $controllerName));
 }