plin-code/laravel-custom-fields
Laravel Custom Fields is a package for adding configurable, model-specific custom fields to Laravel applications. Define field types and validation, assign fields to models, and manage extra metadata or form inputs without schema changes—useful for CMS, CRM, and admin interfaces.
composer require plin-code/laravel-custom-fields, then publish and run the package migrations (php artisan vendor:publish --tag=... and php artisan migrate). Check the published config/custom-fields.php for table names, value column types, and any caching settings before you build on top of it.number, boolean, contains, etc.) used for querying.number, a boolean, a contains text field), store values on a model, then expose a filtered index endpoint using the package's filters. This exercises definition lookup, storage, and querying in one pass.InvalidFilterValueException) rather than silently matching the wrong rows.key/slug column you can reference from code so definitions can be renamed without breaking callers.with() the values relation; a per-row lazy load of custom fields is the most common N+1 source in this kind of package.InvalidFilterValueException bubble up as a 400. That keeps controller code thin and gives you one place to log rejected filter input.exists() checks. The 1.0.1 fix wraps the insert in a savepoint and, on UniqueConstraintViolationException, turns the losing insert into an update of the row the other request wrote — later write wins, same as sequential execution. So write paths can be a plain "store value" call; do not add your own check-then-insert guard around it.tenant_id, field_id), otherwise the package's race handling resolves against the wrong row.true, false, "1.5", arrays, empty string) and assert stored values round-trip through the filters. For concurrency, a paratest or a simulated double-insert inside a transaction is usually enough to confirm the savepoint behaviour.true/false in a query string are converted to PHP booleans before Laravel's integer rule sees them, and integer accepts booleans — previously that meant a number filter silently matched value 1, and contains searched for the literal 1. Both now throw InvalidFilterValueException. If your frontend sends ?count=true for a numeric field, it will start returning 400s; send the correct filter type or omit the parameter.?active=true on a boolean filter still works as before — don't "fix" your frontend by converting booleans to 1/0, that just moves the bug.InvalidFilterValueException to 400, do it in the exception handler (render/register) so API consumers get a clean error instead of a 500.updated_at guard yourself — the package will not surface a conflict.composer update plin-code/laravel-custom-fields, then run your suite paying attention to filter tests and any endpoint that accepted loosely typed numbers.How can I help you explore Laravel packages today?