1. Go to this page and download the library: Download goldfinch/json-editor 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/ */
goldfinch / json-editor example snippets
use Goldfinch\JSONEditor\Forms\JSONEditorField;
use Goldfinch\JSONEditor\ORM\FieldType\DBJSONText;
private static $db = [
'Json' => DBJSONText::class,
];
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldsToTab(
'Root.Main',
[
JSONEditorField::create('Json', 'Json', $this),
]
);
return $fields;
}
bash
php taz make:json-schema
bash
php taz make:json-schema
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.