superzc / qqconnect
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
README
This package provides additional features to the Laravel framework.
Installation
You can install the package via composer:
composer require superzc/qqconnect
Usage
修改QQ互联配置文件config/qqconnect.php
return [ 'appid' => 'xxx', 'appkey' => 'xxx', 'callback' => 'https://example.com/qc_redirect.html', ];
调用类方法
use Superzc\QQConnect\QQConnect; use Superzc\QQConnect\Exceptions\DefaultException as QCException; try { $qqconnect = new QQConnect(); $qqconnect->init($openid, $access_token); $result = $qqconnect->doSomething(); } catch (MPDefaultException $e) { return response()->json([ 'ret' => $e->getCode(), 'msg' => $e->getMessage(), ]); }
使用门面
use Superzc\QQConnect\Facades\QQConnect; try { QQConnect::init($openid, $access_token); $result = QQConnect::doSomething(); } catch (QCException $e) { return response()->json([ 'ret' => $e->getCode(), 'msg' => $e->getMessage(), ]); }
Change log
暂无