diff --git a/app/Traits/Updates.php b/app/Traits/Updates.php new file mode 100644 index 000000000..2f9a285a7 --- /dev/null +++ b/app/Traits/Updates.php @@ -0,0 +1,46 @@ +getPathByAlias($alias); + + foreach ($files as $file) { + File::delete($path . '/' . $file); + } + } + + /** + * delete the folders. + */ + public function deleteFolders(array $folders, $alias = null): void + { + $path = $this->getPathByAlias($alias); + + foreach ($folders as $folder) { + File::deleteDirectory($path . '/' . $folder); + } + } +}