https://github.com/muetze42/nova-secret-field
This package provides a custom secret field that can be toggled to see its value.
https://github.com/muetze42/nova-secret-field
laravel laravel-nova laravel-nova-field nova-4 nova-field nova-fields
Last synced: 2 months ago
JSON representation
This package provides a custom secret field that can be toggled to see its value.
- Host: GitHub
- URL: https://github.com/muetze42/nova-secret-field
- Owner: Muetze42
- License: mit
- Created: 2022-04-21T23:04:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-24T17:33:58.000Z (over 2 years ago)
- Last Synced: 2025-04-12T11:54:58.664Z (2 months ago)
- Topics: laravel, laravel-nova, laravel-nova-field, nova-4, nova-field, nova-fields
- Language: Vue
- Homepage: https://novapackages.com/packages/norman-huth/nova-secret-field
- Size: 67.4 KB
- Stars: 3
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```php
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:
```php
SecretField::make(__('Token'), 'token')->disableClipboard(),
```#### Translate/Message text
Default:
```json
{
"Copied": "Kopiert",
"Copying failed": "Kopieren fehlgeschlagen"
}
```Change messages
```php
SecretField::make(__('Token'), 'token')
->copiedMsg(__('Copied'))
->failedMsg(__('Copying failed')),
```### Misc
For Nova 3:
[nalingia/nova-secret-field](https://github.com/nalingia/nova-secret-field)---
[](https://huth.it/nova-packages)[](https://vshymanskyy.github.io/StandWithUkraine/)
[](https://linktr.ee/CurrentPetitionsFreeIran)