π¦ Archived
This repository is archived and no longer maintained.
If you offer, maintain, or know of an actively maintained alternative to this project, please contact me at maintainers@huth.it.
If the alternative references this repository as its source, inspiration, predecessor, or migration path, I may list it here so existing users can find a maintained replacement.
Nova Secret Field
This package provides a custom secret field that can be toggled to see its value.
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


