- How do I add dynamic custom fields to a Filament admin panel without migrations?
- Use the `UsesCustomFields` trait on your Eloquent model and register the `CustomFieldsPlugin` in your Filament panel. The package stores field definitions in a dedicated table, so no manual migrations are required. Simply add `CustomFields::form()->build()` to your Filament form schema.
- Does this package work with Laravel 12 and Filament 5.x?
- Yes, **relaticle/custom-fields** is fully compatible with Laravel 12 and Filament 5.x. The package explicitly requires PHP 8.3+ and Filament 5.0+, so ensure your stack matches these versions before installation.
- Can I restrict custom fields to specific tenants in a multi-tenant SaaS app?
- Absolutely. The package includes built-in tenant isolation, allowing you to scope custom fields to individual tenants. This is configured via the plugin’s tenant-aware field definitions, ensuring data stays isolated by default.
- What field types are included, and can I add custom ones?
- The package ships with 20+ field types (text, select, date, rich editor, file uploads, etc.). You can extend it by implementing the `FieldTypeDefinitionInterface` and using the plugin’s auto-discovery system for custom field types.
- How does conditional visibility work for custom fields?
- Conditional visibility is handled via rules defined in the field configuration (e.g., show a field only if another field’s value matches a condition). This logic is applied dynamically in Filament forms/tables, with no extra frontend JavaScript required.
- Is there a way to import/export custom fields as CSV?
- Yes, the package includes built-in CSV import/export functionality for custom field data. You can trigger exports via the admin UI or programmatically using the `CustomFields` facade, making bulk data management straightforward.
- How does performance scale with many custom fields per model?
- Performance depends on usage, but the package mitigates overhead by caching field definitions and supporting eager loading. For high-volume models, consider caching custom field data in Redis or optimizing queries with `with()` clauses on your Eloquent models.
- What’s the AGPL-3.0 license impact on my closed-source Laravel app?
- The AGPL-3.0 license requires open-sourcing your entire application if you use the package. For proprietary projects, you must purchase a commercial license from Relaticle. Evaluate alternatives like `spatie/laravel-activitylog` or custom solutions if licensing is a blocker.
- Can I encrypt sensitive custom field data (e.g., passwords, PII)?
- Yes, encryption is optional but supported. Configure field-level encryption via the field definition’s `encrypted` property. The package handles secure storage and retrieval, but ensure your Laravel `APP_KEY` is properly set for encryption.
- Are there alternatives to this package for simpler use cases?
- For basic needs, consider Laravel’s built-in model attributes or `spatie/laravel-medialibrary` for file fields. However, **relaticle/custom-fields** stands out for its Filament integration, multi-tenancy, and extensibility—ideal for complex admin panels or SaaS platforms.