nowakadmin/selectable-key-value

A Laravel Nova field.

dev-main 2025-06-13 10:17 UTC

This package is auto-updated.

Last update: 2025-06-13 10:17:29 UTC


README

A Laravel Nova custom field for key-value pairs where the key is a dropdown (select) with options set via ->options().

Usage

use NowakAdmin\SelectableKeyValue\SelectableKeyValue;

SelectableKeyValue::make('Settings')
    ->options([
        'option1' => 'Option 1',
        'option2' => 'Option 2',
    ])

Installation

  1. Install the package in your Nova project:
    composer require nowakadmin/selectable-key-value
  2. Build assets:
    cd nova-components/SelectableKeyValue
    npm install && npm run dev
  3. Register the field in your Nova resource as shown above.