ohmygodvt95/dkkd-checker

This is my package dkkd-checker


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Use keywords to search for company registered information on government portal.

Installation

You can install the package via composer:

composer require ohmygodvt95/dkkd-checker

Optionally, you can publish the config file with:

php artisan vendor:publish --tag="dkkd-checker-config"

This is the contents of the published config file:

<?php

// config for Ohmygodvt95/DKKDChecker
return [
    'token' => [
        'endpoint' => 'https://dichvuthongtin.dkkd.gov.vn/inf/default.aspx',
        'regex' =>  '/id=\"ctl00_hdParameter\".+value=\"([a-zA-Z0-9\-]+)\"/m'
    ],
    'search' => [
        'endpoint' => 'https://dichvuthongtin.dkkd.gov.vn/inf/Public/Srv.aspx/GetSearch'
    ]
];

Usage

use Ohmygodvt95\DKKDChecker\DKKDChecker;

var_dump(DKKDChecker::search('0101659906'));

/** 
// result

array:3 [
    0 => array:14 [
        "__type" => "Inf.BusinessLayer.BusinessEntities.ApacheSolr.Enterprise"
        "Id" => "540179"
        "Name" => "CÔNG TY CỔ PHẦN GMO-Z.COM RUNSYSTEM"
        "Name_F" => "GMO-Z.COM RUNSYSTEM JOINT STOCK COMPANY"
        "Short_Name" => ""
        "Enterprise_Code" => "0005768616"
        "Enterprise_Gdt_Code" => "0101659906"
        "Status" => null
        "City_Id" => "81"
        "District_Id" => "1035"
        "Ward_Id" => "12068"
        "Ho_Address" => "Tầng 6, Tòa nhà Ocean Park, Số 01 Đào Duy Anh, Phường Phương Mai, Quận Đống Đa, Thành phố Hà Nội, Việt Nam"
        "Ho_Address_F" => "Tầng 6, Tòa nhà Ocean Park, Số 01 Đào Duy Anh, Phường Phương Mai, Quận Đống Đa, Hà Nội, Vietnam"
        "Legal_First_Name" => "NGÔ VĂN TẨU"
    ],
    .....
]
 */

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.