Skip to content

Commit

Permalink
修改yii2-wx的使用方法
Browse files Browse the repository at this point in the history
  • Loading branch information
abei2017 committed Sep 24, 2018
1 parent b15f1b3 commit 3ae4a32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ yii2-wx采用单一接口驱动功能的思路,比如下面的代码将生成
```php
use abei2017\wx\Application;

$conf = Yii::$app->params['wx']['mp'];
// 方法一
$qrcode = (new Application())->driver('mp.qrcode');

// 方法二
$conf = Yii::$app->params['wechat'];// 自定义配置数组key(最后一层数组key不可以更改)
$app = new Application(['conf'=>$conf]);

$qrcode = $app->driver('mp.qrcode');
Expand Down
2 changes: 1 addition & 1 deletion src/mini/user/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* User
* @author abei<[email protected]>
* @link https://nai8.me/yii2wx
* @link https://nai8.me/study/yii2wx.html
* @package abei2017\wx\mini\user
*/
class User extends Driver {
Expand Down

0 comments on commit 3ae4a32

Please sign in to comment.