PHP code example of nsavinov / nova-json-schema-field
1. Go to this page and download the library: Download nsavinov/nova-json-schema-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/ */
nsavinov / nova-json-schema-field example snippets
use Nsavinov\NovaJsonSchemaField\NovaJsonSchemaField;
public function fields(Request $request)
{
return [
// ...
NovaJsonSchemaField::make('Settings', $this->schema())
->listClass('list-reset'), // optional style class for detailed component
];
}
private function schema(): array
{
return [
// your schema
];
}