Download the PHP package valentin-morice/filament-json-column without Composer
On this page you can find all versions of the php package valentin-morice/filament-json-column. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download valentin-morice/filament-json-column
More information about valentin-morice/filament-json-column
Files in valentin-morice/filament-json-column
Package filament-json-column
Short Description A simple package to view and edit your JSON columns in Filament
License MIT
Homepage https://github.com/valentin-morice/filament-json-column
Informations about the package filament-json-column
filament-json-column
v2.0 BREAKING CHANGE
Class is now named JsonColum/JsonInfolist
, previously FilamentJsonColumn
A simple package to view and edit your JSON columns in Filament.
Installation
You can install the package via composer:
Usage
The filament-json-column plugin works as any other Filament Form Builder classes. Make sure the column on which it is called is cast to JSON or array within your Eloquent model.
The form component provides you with two tabs: Viewer
& Editor
. The Viewer
tab pretty prints your JSON data, while the Editor
tab lets you edit it conveniently.
All the methods provided by the plugin accept closures, injected with standard Filament utilities.
Personnalize the accent color
The tab selector menu uses the slateblue
CSS color by default. However, you can choose any other color:
Display a single tab
If you'd like to use only one of the tabs, without giving your user the possibility to switch to another, use the following methods:
Change the height
Editor modes
Customize the editor modes. Accepted values (and default) are: ['code', 'form', 'text', 'tree', 'view', 'preview' ]
Validation
Values are validated as proper JSON by default.
Credits
I've taken inspiration from the following plugins: Pretty JSON & JSONeditor.
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-json-column with dependencies
filament/forms Version ^3.0
filament/notifications Version ^3.3
spatie/laravel-package-tools Version ^1.15.0