• Stars
    star
    114
  • Rank 300,735 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

中国(大陆)公民身份证工具类🔨用于身份证计算年龄、生日、星座、性别、生肖、政区划代码,同时绘制身份证正反面

IdentityCard

中国(大陆)公民身份证类

Latest Stable Version Total Downloads License build status

🪤 快速安装

composer require "alicfeng/identity-card" --optimize-autoloader -vvv

🚀 快速使用

use AlicFeng\IdentityCard\Information;

$id = 'IdentityCard';

# 获取周岁 | 
$age = Information::identityCard()->age($id);

# 获取生日
$birthday = Information::identityCard()->birthday($id);

# 获取性别 | {男为M | 女为F}
$sex = Information::identityCard()->sex($id);

# 获取生肖
$constellation = Information::identityCard()->constellation($id);

# 获取星座
$star = Information::identityCard()->star($id);

# 获取星座
$star = Information::birthday()->star($birthday);

# 获取年龄
$age = Information::birthday()->age($id);

# 生成身份证正面
$front = Information::identityCard()->createFrontImage(...);

# 生成身份证反面
$back = Information::identityCard()->createBackImage(...);

# 获取省
$province = Information::identityCard()->province($id, $default='');

# 获取市
$city = Information::identityCard()->city($id, $default='');

# 获取区
$area = Information::identityCard()->area($id, $default='');

🏷 更新说明

  • V1.0

    在版本 1.0 中,证件号码错误都是返回false

  • V2.0

    在版本 2.0 中添加异常捕获机制,证件错误将返回异常,只有c::validate($id)方法返回bool值。

  • V2.3

    在版本 2.3 添加了一个新功能,可以提供身份证信息生成身份证图片。

    注意:图片的大小为:865 * 540 px

  • V3.0 - 2019.06.25

    在版本 3.0 添加了根据省份正号码获取省、市、区行政地区中文名称。

    行政地区编码源于中华人民共和国民政部,更新于 2019-06-21

  • V3.0.1 - 2019.11.05

    行政地区编码源于中华人民共和国民政部,更新于 2019-11-05

  • V3.1.0 - 2020.02.23

    行政地区编码源于中华人民共和国民政部,更新于 2020-02-19

    同时更新了内部实现的机制,调用的方法已经改变了,但是兼容低版本,建议更新旧的调用方法,将于2020.08.01不再支持旧的sdk

More Repositories

1

mysql_markdown

It can generate markdown structure documents of MySQL succinctly~
Go
435
star
2

note

笔记分享 | Note Share
HTML
114
star
3

TeamStandard

基于gitbook构建团队项目开发规范文档,期待你的提议☆⌒(*^-゜)v THX!!
PHP
90
star
4

AShell

开发者常用脚本shell
Shell
80
star
5

gogs_drone_docker

For the better CI as well as CD using gogs and drone base on Docker
Dockerfile
77
star
6

mobileGroupControlSystem

mobile group control system | 手机群控系统
PHP
51
star
7

sshAutoLogin

It can make your ssh login simply as well as efficiently on Mac or Linux.
Shell
22
star
8

sise

广州大学华软软件学院信息管理Android客户端
Java
13
star
9

WechatRecord

Android手机微信客户端聊天记录超权限解析 | 咦~源码怎么在dev分支呢
10
star
10

kubernetes_cicd

For the better CI as well as CD using gogs and drone base on kubernetes
9
star
11

laravel-runtime

基于Laravel构建请求信息日志以及接口智能分析
PHP
9
star
12

Linux_env

This is about Unix/Linux Tool including shell 、python as well as tool,and so on
Shell
9
star
13

KubernetesClient

kubernetes client for k8s manager~
PHP
7
star
14

laravel-migrate

基于 Laravel 官方针对 Migrate 层面构建增强化扩展组件
PHP
5
star
15

gin_template

基于 gin 框架的服务基准框架
Go
4
star
16

service-client

一款远程调用微服务通讯的客户端,支持多种通讯协议
PHP
4
star
17

publish_aliyun_oss

Drone plugin for aliyun.oss publish static resource
Go
3
star
18

wechat-withdrawal-monitor

基于itchat库构建文件撤回监听并发送到微信助手
Python
3
star
19

api-response

PHP
2
star
20

callback_tool

Callback debugging terminal tool~
Go
1
star
21

wechatRecordServer

wechatRecord-Server
PHP
1
star
22

dockerfile

构建开发环境容器-Dockerfile
Dockerfile
1
star
23

storage.draw.io

1
star
24

learncode

学习编程语言的源码记录
Python
1
star
25

FrontStandard

前端规范
HTML
1
star
26

aliyun_rocket_mq

基于阿里云官方SDK增强组件,更加优雅的应用姿势、更加灵活的动态配置,让应用层服务组件更加标准规范
PHP
1
star
27

laravel-helper

Laravel-helper is designed to help you generate code specification and robust architecture~
PHP
1
star