github statikbe/laravel-filament-flexible-content-block-pages 4.2.0
v4.2.0

latest release: 4.2.1
3 hours ago

Add Boost skill for adding settings fields, and fix settings extension issues

Adds resources/boost/skills/add-flexible-pages-setting so Laravel Boost can guide agents through adding a CMS setting field, and fixes the issues found while documenting that path:

  • Settings::setting() returns string|int|float|bool|array|null, so cast columns (integer, array) keep their type instead of hitting the string|bool|null hint.
  • Settings::setting() resolves translations with isTranslatableAttribute() instead of is_array(), so a non-translatable array setting is no longer mistaken for a translation set.
  • Settings::setting() honours its $locale argument. Spatie resolves translatable attributes to the current app locale, so setting($field, 'fr') returned the current locale's value and cached it under the 'fr' key.
  • Add Settings::registerExtraMediaCollections() so extending models add media collections without dropping the package's own via a missing parent:: call.
  • Add SettingsMediaObserver to flush the settings cache when settings media is saved or deleted. Filament's media upload field is dehydrated(false), so a media-only save leaves the model clean, fires no updated event, and left cached image URLs stale forever.
  • Fix the settings extension docs: the getExtraFormTabs() example lived on the resource, while the method is public static on SettingsFormSchema, so the documented fields never appeared.

Full Changelog: 4.1.6...4.2.0

Don't miss a new laravel-filament-flexible-content-block-pages release

NewReleases is sending notifications on new releases.