ivanmercedes/flex-fields
Flex Fields lets you add dynamic custom fields to Laravel Eloquent models. Define field schemas, attach values to any model, and query them without extra migrations—ideal for user-defined metadata, CMS content, and configurable forms.
This is a 0.7.x update. The provided 0.7.1 notes are a bugfix release for field caching on newer Laravel applications: active entity fields are cached as plain attributes and rebuilt as models when read. Upgrade especially if record forms are failing with a TypeError on a new Laravel app where cached PHP classes are not unserialized (cache.serializable_classes). The repeater sub-field rendering and is_shown_in_list table-column behavior from the 0.6.x line still apply.
Minimal steps:
composer update <vendor>/<package>
php artisan optimize:clear
php artisan config:cache
TypeError on newer Laravel apps.Where to look first:
TypeError on a new Laravel app: check the package version first, then clear caches.is_shown_in_list, searchability, field groups, conditional visibility and validation are configured.Treat custom fields as configuration-driven schema: define fields in the admin form rather than hard-coding every form input. This lets you add fields, group them, and expose them in tables without a deploy.
Common patterns:
is_shown_in_list on fields that should become columns. In the current line these render for boolean, image, color and formatted text columns. Mark the field searchable if you want it searchable in the table.ff_-prefixed repeater keys.TypeError in record forms.A useful integration rule: keep one canonical field-key convention across admin forms, APIs, imports and AI-generated data. The 0.6.1 repeater fix makes the admin form expect declared sub-field keys; older stored data is normalized when read.
TypeError on new Laravel apps: older cached active fields could come back as incomplete classes when Laravel does not unserialize PHP classes from cache (cache.serializable_classes). 0.7.1 fixes this by caching plain attributes and rebuilding models on read. Upgrade rather than relying only on a cache clear.ff_-prefixed sub-field keys. The 0.6.1+ line normalizes those when reading, so old records should still display. Any custom writers — API endpoints, importers, AI tools — should now write declared sub-field keys, not prefixed keys.is_shown_in_list and whether its field type has a table-column renderer.TypeError on a new Laravel app, check the package version and clear caches before changing field definitions or form schema.is_shown_in_list, searchable flag, field type), then inspect the resource table registration, then clear caches.cache.serializable_classes is restrictive.How can I help you explore Laravel packages today?