Ejemplo n.º 1
0
 /**
  * Removes an existing plugin
  * @param string $name Plugin name.
  * @return self
  */
 public function rollbackPlugin($name)
 {
     /*
      * Remove the plugin database and version
      */
     if (!($plugin = $this->pluginManager->findByIdentifier($name))) {
         if ($this->versionManager->purgePlugin($name)) {
             $this->note('<info>Purged from database:</info> ' . $name);
             return $this;
         }
     }
     if ($this->versionManager->removePlugin($plugin)) {
         $this->note('<info>Rolled back:</info> ' . $name);
         return $this;
     }
     $this->note('<error>Unable to find:</error> ' . $name);
     return $this;
 }