PHP code example of gldrenthe89 / nova-string-generator-field
1. Go to this page and download the library: Download gldrenthe89/nova-string-generator-field library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gldrenthe89 / nova-string-generator-field example snippets
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
bash
php artisan vendor:publish --provider="Gldrenthe89\NovaStringGeneratorField\NovaStringGeneratorFieldServiceProvider" --tag="translations"