emilkitua/laravel-nida 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

emilkitua/laravel-nida

最新稳定版本:v1.0.0

Composer 安装命令:

composer require emilkitua/laravel-nida

包简介

PHP/Laravel package for NIDA integration

README 文档

README

Here is the adapted README for your Laravel package, customized with your GitHub profile information:

Laravel Nida

Unofficial Laravel package for fetching user information based on National ID Number made by emilkitua

Releases License: MIT

Installation

You can install the package via Composer:

composer require emilkitua/laravel-nida

Usage

To fetch user information based on ID number, do this:

use EmilKitua\Nida\Nida;

$nida = app(Nida::class);
$userDetail = $nida->loadUser('XXXXXXXXX');
print_r($userDetail);

The output will be similar to:

[
    'Nin' => 'XXXXXX',
    'Firstname' => 'XXXXXX',
    'Middlename' => 'XXXXXX',
    'Surname' => 'XXXXXX',
    'Othernames' => 'XXXXXX',
    'Sex' => 'XXXXXX',
    'Dateofbirth' => 'XXXXXX',
    'Residentregion' => 'XXXXXX',
    'Residentdistrict' => 'XXXXXX',
    'Residentward' => 'XXXXXX',
    'Residentvillage' => 'XXXXXX',
    'Residentstreet' => 'XXXXXX',
    'Residentpostcode' => 'XXXXXX',
    'Permanentregion' => 'XXXXXX',
    'Permanentdistrict' => 'XXXXXX',
    'Permanentward' => 'XXXXXX',
    'Permanentvillage' => 'XXXXXX',
    'Permanentstreet' => 'XXXXXX',
    'Birthcountry' => 'XXXXXX',
    'Birthregion' => 'XXXXXX',
    'Birthdistrict' => 'XXXXXX',
    'Birthward' => 'XXXXXX',
    'Nationality' => 'XXXXXX',
    'Phonenumber' => 'XXXXXX',
    'Maritalstatus' => 'XXXXXX',
    'Occupation' => 'XXXXXX',
    'Primaryschooleducation' => 'XXXXXX',
    'Primaryschooldistrict' => 'XXXXXX',
    'Primaryschoolyear' => 'XXXXXX',
    'Photo' => 'XXXXXX',
    'Signature' => 'XXXXXX',
    'Nationalidnumber' => 'XXXXXX',
    'Lastname' => 'XXXXXX'
]

You can access user information by using keys and attributes just as shown below:

echo $userDetail['Firstname']; // 'XXXXXX'
echo $userDetail->get('Middlename'); // 'XXXXXX'
echo $userDetail->Lastname; // 'XXXXXX'

Image and Signature Support

National ID Photo and Signature are auto-converted into PHP image resources, and you can easily save them:

imagepng($userDetail['Photo'], 'National_ID.png');
imagepng($userDetail['Signature'], 'Signature.png');

If you want the data to be in the same format as the API without any side-effect preprocessing, do this instead while loading the user:

$userDetail = $nida->loadUser('xxxxxxxxxx', true);
print_r($userDetail);

Give it a Star

Did you find this repository useful? Give it a star so more people can discover it!

Issues

Facing any issues with the package? Raise an issue on the GitHub repository and I will look into fixing it as soon as possible.

Contributions

Contributions are welcome! If there's anything you'd like to add, fork the repository and submit a pull request.

Disclaimers

This is not an official package. Therefore, I am not responsible for any misinformation or misuse of the package of any kind!

Credits

All the credits to Kalebu for the python package that I replicated to create this

统计信息

  • 总下载量: 39
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固