- What is codebar-ag/laravel-filament-json-field used for?
- It provides a Filament form field for editing JSON directly in Laravel admin panels. Use it for settings, metadata, feature flags, or integration payloads stored in JSON columns. It replaces raw textareas with a dedicated editor that supports formatting and validation. Its value is limited to Filament-based back-office forms, not APIs or non-Filament admin stacks.
- How do I install laravel-filament-json-field?
- Install it with Composer using composer require codebar-ag/laravel-filament-json-field. Then import the field class and add it to a Filament resource form. No complex service provider setup is expected for a field package. Check the README for the exact namespace and registration steps.
- Which Laravel and Filament versions are supported by this package?
- The package Composer constraints determine compatibility with Laravel, Filament, and PHP. Check the current composer.json or README before installing because Filament major versions can break field APIs. Pin the package version and test in staging with the same Filament major as production. If your Filament version is not covered, do not adopt it without testing or forking.
- How do I add the JSON field to a Filament resource form?
- Import the field class and add it to the form schema in your Filament resource. Bind it to a JSON or text column that holds valid JSON, and configure validation rules as needed. Test create, edit, and view flows in a sandbox panel first. Keep your existing editor in place until the new field is proven on one low-risk resource.
- Does the field validate JSON before saving?
- The package is described as providing a JSON editor with formatting and validation. Confirm invalid JSON save behavior and error messages in a staging spike before relying on it. Add explicit validation rules if you need stricter guarantees. Do not assume client-side validation replaces server-side JSON checks.
- How does it handle large JSON payloads?
- It is a UI component, so backend scaling impact is negligible. The practical concern is editor performance, validation latency, and user error rates with large JSON documents. Set practical size limits and prefer schema-assisted editing where payloads are large. Test with realistic payloads before rolling the field out broadly.
- Does the JSON field support read-only or disabled states?
- Filament fields typically support disabled or read-only states, but confirm this package's behavior in your Filament version. Test view pages and authorization policies to ensure the editor does not allow unintended edits. If read-only rendering is unreliable, fall back to a native textarea or key-value component. Document the supported states for your team.
- Is laravel-filament-json-field safe to use in production?
- It is MIT-licensed and low architectural risk, but adoption risk is higher due to limited stars and a small maintainer base. Use it first in a non-critical admin resource with a fallback to native Filament components. Pin versions and assign an internal owner. Avoid placing it on a critical path without a documented fork or replacement plan.
- What are alternatives to this JSON field package?
- Filament's native textarea and key-value components are the main fallback for simple JSON editing. You can also build a custom field or wrap a JavaScript JSON editor in a Filament component. Choose based on validation needs, payload size, accessibility, and maintenance appetite. Keep native components in place until the package is proven in your panel.
- Who maintains the package and is it actively updated?
- The repository is MIT-licensed with a single small maintainer and limited community validation. Expect community-only support with no SLA and possible lag behind Filament major releases. Track compatibility at each Filament upgrade and decide whether to fork or replace. Name an internal owner before standardizing on the field.