File tree Expand file tree Collapse file tree 2 files changed +45
-4
lines changed Expand file tree Collapse file tree 2 files changed +45
-4
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Overtrue \LaravelWechat ;
4
+
5
+ use Illuminate \Support \Facades \Facade as LaravelFacade ;
6
+ use Log ;
7
+
8
+ /**
9
+ * @see Overtrue\Wechat\Wechat
10
+ */
11
+ class Facade extends LaravelFacade
12
+ {
13
+ /**
14
+ * 默认提供服务端
15
+ *
16
+ * @return string
17
+ */
18
+ protected static function getFacadeAccessor ()
19
+ {
20
+ return 'wechat.server ' ;
21
+ }
22
+
23
+ /**
24
+ * 魔术方法
25
+ *
26
+ * @param string $method
27
+ * @param array $args
28
+ *
29
+ * @return mixed
30
+ */
31
+ public function __call ($ method , $ args )
32
+ {
33
+ if (isset (static ::$ app ["wechat. {$ method }" ])) {
34
+ Log::warning ("建议不要再统一使用 `Wechat::on()` 等形式使用,overtrue/wechat 2.x 已经改为独立服务类型来使用各模块的功能,更多请参阅文档:https://github.com/overtrue/wechat/wiki " );
35
+ return static ::$ app ["wechat. {$ method }" ];
36
+ }
37
+
38
+ parent ::__call ($ method , $ args );
39
+ }
40
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
return [
3
- 'appId ' => 'Your app id ' , // 必填
4
- 'secret ' => 'Your secret ' , // 必填
5
- 'token ' => 'Your token ' , // 必填
6
- 'encodingAESKey ' => 'Your encoding AES Key ' // 加密模式需要,其它模式不需要
3
+ 'use_alias ' => false ,
4
+ 'app_id ' => 'YourAppId ' , // 必填
5
+ 'secret ' => 'YourSecret ' , // 必填
6
+ 'token ' => 'YourToken ' , // 必填
7
+ 'encoding_key ' => 'YourEncodingAESKey ' // 加密模式需要,其它模式不需要
7
8
];
You can’t perform that action at this time.
0 commit comments