marshmallow / nova-field-string-generator
这是一个用于生成随机字符串的 Laravel Nova 字段。它可以用于文本字段和密码字段。
v2.0.0
2022-05-06 14:35 UTC
Requires
- php: ^8.0
- laravel/nova: ^4.0
- dev-master
- v2.0.0
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/sass-loader-13.3.2
- dev-dependabot/npm_and_yarn/vue-loader-17.2.2
- dev-dependabot/github_actions/overtrue/phplint-8.2
- dev-dependabot/npm_and_yarn/resolve-url-loader-5.0.0
- dev-nova4
- dev-development
- dev-stefvanesch-patch-2
- dev-stefvanesch-patch-1
This package is auto-updated.
Last update: 2024-09-12 11:43:57 UTC
README
用于生成随机字符串的 Laravel Nova 字段
安装
您可以通过 composer 将此包安装到使用 Nova 的 Laravel 应用程序中
composer require marshmallow/nova-field-string-generator
use Marshmallow\NovaGenerateString\GenerateString; and add in the fields GenerateString::make(__('Random string'), 'random_string') ->onlyOnForms() ->creationRules('required', 'string', 'min:12') ->updateRules('nullable', 'string', 'min:12') //You can specifiy the password length here ->length(12) //exclude characters types from password (Symbols, Numbers. Uppercase, Lowercase, Similar), do not call method to include all types ->excludeRules(['Symbols', 'Lowercase', 'Similar']), GeneratePassword::make(__('Password'), 'password'), ## License: The MIT License (MIT). Please see [License File](LICENSE.md) for more information.