[5.9.3] - 09-09-2024
Added
- Custom locale display config options (thanks to @Gertiozuni)
Changed
- NB! Removed SEO image field from defaults since deleting media no longer works
- Suggested replacement is nova-media-hub
- Updated packages
Migrating SEO images to nova-media-hub migration example:
Page::all()->each(function ($page) {
$page->seo = collect($page->seo)->map(function ($seoInfo) {
if ($imagePath = $seoInfo['image'] ?? null) {
if (!Storage::disk('public')->exists($imagePath)) {
$seoInfo['image'] = null;
return $seoInfo;
}
$base64File = base64_encode(Storage::disk('public')->get($imagePath));
$media = rescue(fn() => MediaHub::storeMediaFromBase64($base64File, 'public', 'default'), null);
$seoInfo['image'] = $media?->id ?? null;
}
return $seoInfo;
})->toArray();
$page->save();
});