PHP code example of codebar-ag / filament-json-field
1. Go to this page and download the library: Download codebar-ag/filament-json-field 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/ */
codebar-ag / filament-json-field example snippets
use CodebarAg\FilamentJsonField\Forms\Components\JsonInput;
...
public function form(Form $form): Form
{
return $form
->schema([
JsonInput::make('json')
->label('JSON')
->lineNumbers(true)
->lineWrapping(true)
->autoCloseBrackets(true)
->darkTheme(true)
->foldingCode(true)
->foldedCode(true), // Folded code will fold the code on form load
]);
}
...
use CodebarAg\FilamentJsonField\Infolists\Components\JsonEntry;
...
public function form(Form $form): Form
{
return $form
->schema([
JsonEntry::make('json')
->label('JSON')
->lineNumbers(true)
->lineWrapping(true)
->autoCloseBrackets(true)
->darkTheme(true)
->foldingCode(true)
->foldedCode(true), // Folded code will fold the code on form load
]);
}
...