jccoca / filament-json-column
A simple package to view and edit your JSON columns in Filament
Package info
github.com/JCCoca/filament-json-column
Language:Blade
pkg:composer/jccoca/filament-json-column
Requires
- php: ^8.2
- filament/forms: ^5.0
- filament/infolists: ^5.0
- filament/notifications: ^5.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^9.0
- nunomaduro/larastan: ^3.0
- orchestra/testbench: ^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
V1 of the package, built for Filament 5.
Overview
filament-json-column provides a compact JSON viewer and editor for Filament 5 forms and infolists. It is intended for JSON or array cast attributes in your Eloquent models.
Installation
composer require jccoca/filament-json-column
Usage
Add the component to a Filament 5 schema.
use Filament\Schemas\Schema; use JCCoca\FilamentJsonColumn\JsonColumn; use JCCoca\FilamentJsonColumn\JsonInfolist; public static function form(Schema $schema): Schema { return $schema->schema([ JsonColumn::make('example'), ]); } public static function infolist(Schema $schema): Schema { return $schema->schema([ JsonInfolist::make('example'), ]); }
The form component provides both a viewer and an editor, with automatic JSON validation.
Compatibility
- Filament 5.x
- PHP 8.2+
- Laravel 12.x
Credits
Inspired by Pretty JSON and JSONeditor. Original code base created by valentin-morice.
This package loads JSONEditor from a CDN. See THIRD_PARTY_NOTICES.md for third-party notices.
License
The package code is released under the MIT License. See LICENSE.md for details.