-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bill li
committed
Nov 19, 2017
1 parent
cb423e8
commit f16c305
Showing
4 changed files
with
24,974 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/vendor/ | ||
.DS_Store | ||
.phpintel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
# identity-card | ||
A simple proof of identity card of the people's Republic of China. | ||
|
||
China (region) citizen ID card tool | ||
------------------------ | ||
|
||
> China (Mainland) ID card package, the data from the national standard `GB / T 2260-2007` (People's Republic of China administrative divisions code standard). | ||
### Installing | ||
|
||
```bash | ||
|
||
composer require anomalylab/component-identity-card | ||
``` | ||
|
||
|
||
### Instructions | ||
|
||
```php | ||
|
||
$idCard = Anomaly\Component\IdentityCard\IdentityCard::make('320106198310290811'); | ||
|
||
$area = $idCard->getArea(); | ||
$gender = $idCard->getGender(); | ||
$birthday = $idCard->getBirthday(); | ||
$age = $idCard->getAge(); | ||
$constellation = $idCard->getConstellation(); | ||
|
||
|
||
``` | ||
|
||
Results: | ||
```json | ||
|
||
{ | ||
"area": "江苏省 南京市 鼓楼区", | ||
"gender": "male", | ||
"birthday": "1983-10-29", | ||
"age": 34, | ||
"constellation": "天蝎座" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "anomalylab/component-identity-card", | ||
"description": "A simple proof of identity card of the people's Republic of China.", | ||
"keywords": [ | ||
"php71", | ||
"ID Card", | ||
"Region", | ||
"Area" | ||
], | ||
"type": "library", | ||
"license": "MIT", | ||
"homepage": "https://anomalylab.org", | ||
"authors": [ | ||
{ | ||
"name": "Bill li", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Anomaly\\Component\\IdentityCard": "src/" | ||
} | ||
} | ||
} |
Oops, something went wrong.