gldrenthe89 / nova-string-generator-field
A Laravel Nova field for generating a random string. This can be used for a Text field and for a Password field.
Installs: 32 109
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 8
Open Issues: 0
Language:Vue
Requires
- illuminate/support: ^10.0|^11.0
- laravel/nova: ~4.0|~5.0
- outl1ne/nova-translations-loader: ^5.0
README
A Nova field which can genarate a string upon creating or updating, this adds a string generator button and copy button to a Text or Password field.
Screenshot
Demo with shown password.
Demo with 'normal' hidden password.
Installation:
You can install the package in to a Laravel app that uses Nova via composer:
composer require gldrenthe89/nova-string-generator-field
use Gldrenthe89\NovaStringGeneratorField\NovaGenerateString; use Gldrenthe89\NovaStringGeneratorField\NovaGeneratePassword; // Field which extends the default Nova Text field NovaGenerateString::make('String') ->length(12) // specify the generated string length (default = 10) ->excludeRules(['symbols']), // exclude characters types (symbols, numbers. uppercase, lowercase) // Field which extends the default Nova Password field NovaGeneratePassword::make('password'), // possible options are the same as above
Localization
The translation file(s) can be published by using the following publish command:
php artisan vendor:publish --provider="Gldrenthe89\NovaStringGeneratorField\NovaStringGeneratorFieldServiceProvider" --tag="translations"
You can add your translations to resources/lang/vendor/nova-string-generator-field/
by creating a new translations file with the locale name (ie et.json
) and copying the JSON from the existing en.json
.
License:
The MIT License (MIT). Please see License File for more information.