Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
J

JSON Schema Field

Readme

JSON schema field for Laravel Nova

Packagist

Laravel Nova field for displaying JSON schema data

screenshot at sep 06 15-11-54

Installation

You can install the package into a Laravel app that uses Nova via composer:

composer require nsavinov/nova-json-schema-field

Usage

Inside the resource:

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
    ];
}

Schema example:

{
	"type": "object",
	"required": [
		"foo",
		"bar"
	],
	"properties": {
		"bar": {
			"type": "integer"
		},
		"foo": {
			"type": "integer",
			"description": "foo"
		}
	}
}
Back to Top
Added 7 years ago
Last updated 7 Years Ago
Version v1.0.2
Composer
nsavinov/nova-json-schema-field
GitHub stars 26
Packagist downloads 93,802

Favorites

14 users favorited

Rating

4.30
(out of 5)
★★★★★
★★★★
★★★
★★
4 ratings

Author

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas