/home/techb158/immovalet.com/vendor/botble/platform/base/src/Supports
Edit: /home/techb158/immovalet.com/vendor/botble/platform/base/src/Supports/BaseSeeder.php (1438B)
forceDelete();
MediaFolder::where('name', $folder)->forceDelete();
$mimeType = new MimeTypes;
$files = [];
$folderPath = ($basePath ?: database_path('seeders/files')) . '/' . $folder;
foreach (File::allFiles($folderPath) as $file) {
$type = $mimeType->getMimeType(File::extension($file));
$files[] = RvMedia::uploadFromPath($file, 0, $folder, $type);
}
return $files;
}
/**
* @return array
* @throws Exception
*/
public function activateAllPlugins(): array
{
$plugins = array_values(scan_folder(plugin_path()));
$pluginService = app(PluginService::class);
foreach ($plugins as $plugin) {
$pluginService->activate($plugin);
}
return $plugins;
}
}