PHPackages                             ouhaohan8023/id-info - 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. ouhaohan8023/id-info

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

ouhaohan8023/id-info
====================

chinese id card info for laravel

0.0.7(1y ago)054MITPHPPHP ^8.1

Since May 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ouhaohan8023/IDInfo)[ Packagist](https://packagist.org/packages/ouhaohan8023/id-info)[ RSS](/packages/ouhaohan8023-id-info/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

IDInfo - Laravel 中国身份证信息提取工具
----------------------------

[](#idinfo---laravel-中国身份证信息提取工具)

### 1. 安装

[](#1-安装)

```
composer require ouhaohan8023/id-info
```

### 2. 配置

[](#2-配置)

```
php artisan vendor:publish --provider="Ouhaohan8023\IDInfo\IDInfoServiceProvider"

迁移   php artisan migrate
初始化  php artisan id-info:init

```

### 使用

[](#使用)

```
// 获取身份证信息
$id = '132235196706122646';
$m = IDInfoFacade::info($id);
dd($m);
dd($m->getProvince());

Ouhaohan8023\IDInfo\Model\IDInfoModel {
  +"province_code": 130000
  +"city_code": 132200
  +"area_code": 132235
  +"province": "xx省"
  +"city": "xx市"
  +"area": "xx县"
  +"age": 18
  +"sex": "男"
  +"zodiac": "猴"
}

// 检查18位身份证是否合法
$str = "141031199604270069";
$d = IDInfoFacade::check18($str); // bool
dd($d);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~120 days

Total

2

Last Release

599d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54025700740179725e05152c2b05eb32b2c33841cc7337cd1be0125749a1b6dd?d=identicon)[ohhink](/maintainers/ohhink)

---

Top Contributors

[![ouhaohan](https://avatars.githubusercontent.com/u/20508778?v=4)](https://github.com/ouhaohan "ouhaohan (8 commits)")

---

Tags

rbac

### Embed Badge

![Health badge](/badges/ouhaohan8023-id-info/health.svg)

```
[![Health](https://phpackages.com/badges/ouhaohan8023-id-info/health.svg)](https://phpackages.com/packages/ouhaohan8023-id-info)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[casbin/casbin

a powerful and efficient open-source access control library for php projects.

1.3k1.4M54](/packages/casbin-casbin)[owasp/phprbac

PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.

435981.3k4](/packages/owasp-phprbac)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)

PHPackages © 2026

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