PHPackages                             imnpc/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. imnpc/laravel-admin-login-check-safe

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

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

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

03PHP

Since Jan 2Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)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

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f149dfb0fcbc9e73b835450b3b2bd4e1b732e0d2113f519705b22f95913acae?d=identicon)[imnpc](/maintainers/imnpc)

---

Top Contributors

[![imnpc](https://avatars.githubusercontent.com/u/5801647?v=4)](https://github.com/imnpc "imnpc (2 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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