PHP code example of valentin-morice / filament-json-column
1. Go to this page and download the library: Download valentin-morice/filament-json-column library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
valentin-morice / filament-json-column example snippets
use ValentinMorice\FilamentJsonColumn\JsonColumn;
use ValentinMorice\FilamentJsonColumn\JsonInfolist;
public static function form(Form $form): Form
{
return $form
->schema([
JsonColumn::make('example'),
]);
}
// An infolist component is also available.
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
JsonInfolist::make('example'),
]);
}
JsonColumn::make('example')->accent(string '#FFFFFF'|Closure); // The input needs to be a valid CSS color
JsonColumn::make('example')->editorOnly(bool|Closure); // Displays only the editor tab
JsonColumn::make('example')->viewerOnly(bool|Closure); // Displays only the viewer tab
JsonColumn::make('example')->editorHeight(int 500|Closure); // Accepts an int, defaults to 300
JsonColumn::make('example')->viewerHeight(int 500|Closure); // Accepts an int, defaults to 300