🛠️ Use sanitized studly case for meetup names in ExtractLogos command output filenames

This commit is contained in:
HolgerHatGarKeineNode
2025-12-05 23:07:28 +01:00
parent 60634146fe
commit 22592bbd23

View File

@@ -35,8 +35,11 @@ class ExtractLogos extends Command
$logo = $meetup->getFirstMedia('logo');
if ($logo) {
if (file_exists($logo->getPath())) {
$safeName = str($meetup->name)
->replaceMatches('/[^a-zA-Z0-9\s\-_]/', '')
->studly();
Storage::disk('public')
->put('00_logos/'.str($meetup->name)->camel().'.'.$logo->extension, file_get_contents($logo->getPath()));
->put('00_logos/'.$safeName.'.'.$logo->extension, file_get_contents($logo->getPath()));
}
}
}