Download the PHP package sixlive/nova-text-copy-field without Composer
On this page you can find all versions of the php package sixlive/nova-text-copy-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sixlive/nova-text-copy-field
More information about sixlive/nova-text-copy-field
Files in sixlive/nova-text-copy-field
Package nova-text-copy-field
Short Description Laravel Nova text field with click to copy support
License MIT
Homepage https://github.com/sixlive/nova-text-copy-field
Informations about the package nova-text-copy-field
Nova Text Copy Field
A Laravel Nova text field with click to copy support. This field behaves just like a text field but adds the ability to copy the field value to your clipboard with just a click.
This package can also be found on Nova Packages.
Installation
Usage
Add the field to a resource.
Truncating long strings
In some cases you may want to truncate the display of a fields value but allow still copy the full value. You can use the truncate()
method to accomplish this.
Masking the field value
This works great for secrets like API Keys.
Copy button title
The title of the copy button defaults to the field name prefixed with 'Copy'. For example, TextCopy::make('Some Field', 'some_field')
the button title will be "Copy Some Field".
If you would like to manually set the title you can use the copyButtonTitle()
method.
Alternative copy value
You can choose to mutate and that is copied to the users clipboard. You can either pass a value or a Closure.
or
Only displaying the button on hover
Screenshots
Default State
Success State
When the field value has been successfully copied to the user's clipboard.
Error State
When there is an error adding the field value to the user's clipboard.
Truncated Display Value
Masked Display Value
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Code Style
StyleCI will apply the Laravel preset.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- TJ Miller
- All Contributors
License
The MIT License (MIT). Please see License File for more information.