| Package Data | |
|---|---|
| Maintainer Username: | kernight |
| Maintainer Contact: | steveliu5153@gmail.com (steve-liuxu) |
| Package Create Date: | 2016-10-18 |
| Package Last Update: | 2016-10-18 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-23 15:03:20 |
| Package Statistics | |
|---|---|
| Total Downloads: | 20 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 1 |
| Total Open Issues: | 0 |
交管服务平台信息查询接口封装,包括违章信息、驾照查分。
##使用注意
- 本分支为Laravel5扩展包
- 需要开启 php-curl 扩展
- 验证码自动识别接口来自易源数据-图形验证码识别
1. 增加多区域支持
2. 增加违章支持
####步骤1. composer
composer require steve-liuxu/jg-service-for-laravel ~0.8
composer update 或者 composer install 引入开发包####步骤2. laravel5安装
找到 config/app.php 配置文件中,key为 providers 的数组,在数组中添加服务提供者。
'providers' => [
// ...
SteveLiuxu\JGService\JGServiceProvider::class,,
]
运行 php artisan vendor:publish 命令,发布配置文件到你的项目中。
配置文件 config/JGService-showapi.php 为验证码识别配置信息文件,接口申请地址为易源数据-图形验证码识别
使用时首先修改 config/JGService-showapi.php 里的配置项
<?php
return [
//appid,在官网的"我的应用"中找到相关值
'showapi_appid' => 'xxxxx',
//app密钥,在官网的"我的应用"中找到相关值
'showapi_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
//验证码识别请求地址
'showapi_url'=>'http://route.showapi.com/184-2',
];
然后在控制器里实例化类,调用即可
Route::get('/test', function (){
$test = new \steveLiuxu\JGService\JGService();
dd($test->GetScore("xxxx","xxxx","xxx"));
});
##开源协议 遵循MIT开源协议。