7777777-7777777 / auth-attempt-limit
为laravel-admin添加验证码和登录尝试
dev-master
2022-09-29 10:25 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
- mews/captcha: ^3.2
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-09-29 05:43:19 UTC
README
为laravel-admin添加验证码和登录尝试
安装
composer require 7777777-7777777/auth-attempt-limit
配置
在config/admin.php
文件的扩展部分,添加配置
'extensions' => [
'auth-attempt-limit' => [
// set to false if you want to disable this extension
'enable' => true,
// configuration
'maxAttempts' => 5,
'decayMinutes' => 1,
]
]
在resources/lang/en(example)/validation.php
文件中,添加配置
'captcha' => 'The :attribute is invalid.',
'attributes' => [
'captcha' => 'captcha',
],
如果您需要修改验证码配置,请参阅mews/captcha
并在config/captcha.php
文件中添加配置
'admin' => [
'length' => 5,
'width' => 120,
'height' => 36,
'quality' => 90,
],
使用方法
在浏览器中打开您的登录页面
许可协议
在MIT 许可证 (MIT)下许可。