private function generar($type) { if (File::exists(app_path($this->directories[$type]))) { File::deleteDirectory(app_path($this->directories[$type])); //borrramos generaciones previas. } File::makeDirectory(app_path($this->directories[$type]), 0777, true); //creamos el directorio en app. switch ($type) { case 'models': list($tables, $connection) = [Table::getTablesCurrentDatabase(), Table::getConexion()]; $this->modificarPlantillaModel($tables, $connection); break; case 'controllers': $this->modificarPlantillaController(); break; case 'views': $this->modificarPlantillaView(); break; case 'langs': $this->modificarPlantillaLang(); break; } $this->info($this->messages[$type . '_generated']); return; }