mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-13 23:56:47 +00:00
🛠️ Use sanitized studly case for meetup names in ExtractLogos command output filenames
This commit is contained in:
@@ -35,8 +35,11 @@ class ExtractLogos extends Command
|
|||||||
$logo = $meetup->getFirstMedia('logo');
|
$logo = $meetup->getFirstMedia('logo');
|
||||||
if ($logo) {
|
if ($logo) {
|
||||||
if (file_exists($logo->getPath())) {
|
if (file_exists($logo->getPath())) {
|
||||||
|
$safeName = str($meetup->name)
|
||||||
|
->replaceMatches('/[^a-zA-Z0-9\s\-_]/', '')
|
||||||
|
->studly();
|
||||||
Storage::disk('public')
|
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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user