lemonlabs / nova-selectable-key-value
Laravel Nova KeyValue field with definable selectable keys.
v0.2.1
2025-10-02 07:20 UTC
Requires
- php: ^8.1
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- laravel/nova: ^5.0
- laravel/nova-devtool: ^1.7
README
A Laravel Nova custom field for key-value pairs where the key is a dropdown (select) with options set via ->keyOptions()
.
Usage
use LemonLabs\SelectableKeyValue\SelectableKeyValue; SelectableKeyValue::make('Settings') ->keyOptions([ 'option1' => 'Option 1', 'option2' => 'Option 2', ])
Installation
- Install the package in your Nova project:
composer require lemonlabs/nova-selectable-key-value
- Use the field in your Nova resource as shown above.