lemonlabs/nova-selectable-key-value

Laravel Nova KeyValue field with definable selectable keys.

v0.2.1 2025-10-02 07:20 UTC

This package is auto-updated.

Last update: 2025-10-02 07:21:10 UTC


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

  1. Install the package in your Nova project:
    composer require lemonlabs/nova-selectable-key-value
  2. Use the field in your Nova resource as shown above.