满洲亚/auth-attempts

为laravel-admin添加验证码和登录尝试

安装量: 2,032

依赖项: 0

建议者: 0

安全: 0

星标: 14

关注者: 1

分支: 4

语言:HTML

1.2 2018-12-07 09:42 UTC

This package is auto-updated.

Last update: 2024-09-14 19:58:54 UTC


README

为laravel-admin添加验证码和登录尝试

屏幕截图

img

安装

composer require manzhouya/auth-attempts

配置

config/admin.php文件的扩展部分中添加配置

'extensions' => [
     'auth-attempts' => [
         // 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)