norman-huth/nova-secret-field

This package provides a custom secret field that can be toggled to see its value.

Downloads

16010

Stars

3

Version

1.0.2

Nova Secret Field

This package provides a custom secret field that can be toggled to see its value.

index
detail
edit

Install

composer require norman-huth/nova-secret-field

Usage

use NormanHuth\SecretField\SecretField;

class Client extends Resource
{
    // ...
    public function fields(NovaRequest $request): array
    {
        return [
            SecretField::make(__('Token'), 'token'),
        ];
    }

Options

Same as a text field and disable „copy to clipboard“ method:

SecretField::make(__('Token'), 'token')->disableClipboard(),

Translate/Message text

Default:

{
    "Copied": "Kopiert",
    "Copying failed": "Kopieren fehlgeschlagen"
}

Change messages

SecretField::make(__('Token'), 'token')
    ->copiedMsg(__('Copied'))
    ->failedMsg(__('Copying failed')),

Misc

For Nova 3:
nalingia/nova-secret-field


More Laravel Nova Packages

Stand With Ukraine

Woman. Life. Freedom.

Muetze42

Author

Muetze42