naif / generate-password
一个Laravel Nova密码字段,具有生成随机密码选项
v1.4
2019-03-17 09:11 UTC
Requires
- php: >=7.1.0
This package is not auto-updated.
Last update: 2024-09-23 14:13:16 UTC
README
一个Laravel Nova密码字段,具有生成随机密码选项
安装
您可以通过composer将此包安装到使用Nova的Laravel应用中
composer require naif/generate-password
用法
将以下内容添加到Nova/User.php资源中
use Naif\GeneratePassword\GeneratePassword; and add in the fields GeneratePassword::make('Password') ->onlyOnForms() ->creationRules('required', 'string', 'min:6') ->updateRules('nullable', 'string', 'min:6') ->length(12) //You can specifiy the password length here ->excludeRules(['Symbols']) //exclude characters types from password //(Symbols, Numbers. Uppercase, Lowercase), do not call method to include all types <img src="https://raw.githubusercontent.com/naifalshaye/nova-random-password-generation/master/screenshots/screen.gif" width="700"> ## Support: naif@naif.io https://www.linkedin.com/in/naif ## License: The MIT License (MIT). Please see [License File](LICENSE.md) for more information.