PHPackages                             iamtong/laravel-admin-login-check-safe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. iamtong/laravel-admin-login-check-safe

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

iamtong/laravel-admin-login-check-safe
======================================

登录添加验证码，后台用户锁定，错误次数过多锁定，密码强制修改，添加密码修改记录，登录日志

1.0.4(5y ago)102.5k↓50%3[1 issues](https://github.com/Iamtong/laravel-admin-login-check-safe/issues)MITPHPPHP &gt;=7.0.0CI failing

Since Aug 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Iamtong/laravel-admin-login-check-safe)[ Packagist](https://packagist.org/packages/iamtong/laravel-admin-login-check-safe)[ Docs](https://github.com/Iamtong/laravel-admin-login-check-safe)[ RSS](/packages/iamtong-laravel-admin-login-check-safe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

\#laravel-admin extension

laravel-admin-login-check-safe
------------------------------

[](#laravel-admin-login-check-safe)

###### 填加以下内容

[](#填加以下内容)

- 登录验证码
- 登录达到配置次数，禁止登录一段时间（可配置）
- 账号密码有有效期，过期禁止登录（配置排除账号名）
- 添加账号禁用，账号禁用后不能登录,如果账号正在使用，会被强制退出登录
- 修改密码添加修改记录
- 添加登录记录
- 限制账号同时使用
- 限制账号不活动达到配置时间后，自动退出

###### 执行步骤如下

[](#执行步骤如下)

- 在项目目录执行以下命令

```
composer require iamtong/laravel-admin-login-check-safe
php artisan vendor:publish --provider=Encore\LoginCheckSafe\LoginCheckSafeServiceProvider
```

- 需要修改 config/admin.php extensions里面添加

```
        //登录验证码/用户锁定
        'login-check-safe' => [
            'enable' => true,
            'login-error-num' => 5,//登录允许密码错误的次数
            'login-error-limit-sec' => 600,//达到错误次数后锁定的时间（单位秒）
            'password-expired' => 90*86400,//密码过期时间 90 天（单位秒）
            'password-expired-except-name' => ['admin'],//排除账号不验证密码过期
            'auto-out-sec' => 1800,//多久没活跃后，自动退出账号（单位秒），设置为0时，表示不开启此功能
            'limit-one-login' => true,//是否开启 限制同时间一个账号仅限一人登录
            'username-rules' => 'regex:/^[a-zA-Z0-9]+$/i|between:3,40',//用户名除了唯一性和必须填写之外的所有规则
            'username-rules-msg' => [
                'regex' => '用户名必须以大小写字母和数字组成',
            ],//对应的提示方法
            'password-strong' => 1,// 【大写字母 小写字母 数字 特殊字符】 密码强度 必须使用其中的几种。
            'password-length' => '6,40',//密码长度范围 10,40 10到40位；
            'db' => [
                //密码修改纪录表
                'password_log_table' => 'admin_password_log',
                'password_log_model' =>Encore\LoginCheckSafe\Models\PasswordLogModel::class,
                //登录日志表
                'login_log_table' => 'admin_login_log',
                'login_log_model' =>Encore\LoginCheckSafe\Models\LoginLogModel::class,
            ]
        ],
```

执行数据库文件

```
php artisan migrate
```

然后在 route.middleware里面添加 Encore\\LoginCheckSafe\\Http\\Middleware\\AdminCheck::class 如下：

```
'middleware' => ['web', 'admin',Encore\LoginCheckSafe\Http\Middleware\AdminCheck::class],
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~161 days

Total

3

Last Release

2135d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55cdbee75d0aea3a4fca75829df042baf370333197bfafb32f6207385d536813?d=identicon)[Iamtong](/maintainers/Iamtong)

---

Tags

extensionlaravel-adminlogin-check-safe

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iamtong-laravel-admin-login-check-safe/health.svg)

```
[![Health](https://phpackages.com/badges/iamtong-laravel-admin-login-check-safe/health.svg)](https://phpackages.com/packages/iamtong-laravel-admin-login-check-safe)
```

###  Alternatives

[james.xue/login-captcha

laravel-admin 登录验证码

3725.4k](/packages/jamesxue-login-captcha)[asundust/auth-captcha

Sliding captcha for Laravel-Admin auth, Multiple platform support / Laravel-Admin登录 滑动验证插件 多平台支持

593.6k](/packages/asundust-auth-captcha)[manzhouya/auth-attempts

Add captcha and login attempts for laravel-admin

142.1k](/packages/manzhouya-auth-attempts)[ghost/google-authenticator

Google 两步验证码

122.5k](/packages/ghost-google-authenticator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
