trappistes/laravel-custom-fields
Flexible EAV custom fields for Laravel Eloquent: add dynamic attributes without schema changes. Supports strong types (int, bool, json, date, ranges), polymorphic relations for any model, eager loading to avoid N+1, auto casting, batch upsert, validation, and soft deletes.
preferences, custom_metadata without schema changes.color, size) as custom fields.user_engagement_score) without altering core tables.upsert and preloading to avoid N+1 queries.For Executives: "This package lets us add dynamic fields to any model (e.g., user profiles, products) without migrations, cutting dev time by 30% for features like custom user preferences or product variants. It’s battle-tested in Laravel ecosystems and supports scalability with batch operations and N+1 query prevention—ideal for our SaaS roadmap."
For Engineering: *"Leverages Laravel’s EAV pattern to store custom fields in a single table, with automatic type conversion (JSON, dates, etc.) and polymorphic support. Key benefits:
nickname or shipping_options without migrations.upsert and Eloquent preloading avoid N+1 queries.For Developers: *"Drop-in trait for Eloquent models. Example:
$user->setCustomField('premium_until', now()->addMonth());
Supports types like json, daterange, and auto-inference. Docs include UUID/ULID setup and soft-delete handling."*
How can I help you explore Laravel packages today?