PHP code example of jucloud / laravel-organization
1. Go to this page and download the library: Download jucloud/laravel-organization library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jucloud / laravel-organization example snippets
$app->register(JuCloud\LaravelOrganization\ServiceProvider::class);
use EasyOrganization;
// keyword 关键词
// page_size 每页大小
// page_index 当前页数
$params = [
'keyword' => 'xxxxxx有限公司',
'page_size' => 0, //非必填
'page_index' => 20, //非必填
];
$result = EasyOrganization::tianyancha($this->config)->search($params);
// 下面这个方法也可以
// return EasyOrganization::search($params);
// 获取机构基本信息
$param = [
'keyword' => 'xxxxxx有限公司', //关键词
];
//
// 天眼查通过entity_type参数管控查询特殊企业(2-香港公司,3-社会组织,4-律所,5-事业单位,6-基金会,9-新机构)数据
// $param = [
// 'keyword' => 'XXXXXX律师事务所', //关键词
// 'entity_type' => '1'
// ];
// $data = EasyOrganization::tianyancha()->baseinfo($param);
//
//
use EasyOrganization;
$result = EasyOrganization::qichacha()->search([
'keyword' => '',
]);
$data = EasyOrganization::qichacha()->baseinfo($param = [
'keyword' => 'xxxxxx有限公司', //关键词
]);
use EasyOrganization;
$result = EasyOrganization::qixin()->search([
'keyword' => '',
]);
$data = EasyOrganization::qixin()->baseinfo($param = [
'keyword' => 'xxxxx律师事务所', //关键词
]);
Shell
php artisan vendor:publish --provider="JuCloud\LaravelOrganization\ServiceProvider" --tag=easy-organization