This commit is contained in:
dongwei 2019-01-16 17:37:40 +08:00
parent 5e4af1ea66
commit 1510f1034d

View File

@ -67,6 +67,8 @@ return [
'user.relatison' => [\App\Rpc\User\RpcUser::class, 'getUserId'], 'user.relatison' => [\App\Rpc\User\RpcUser::class, 'getUserId'],
'order.info' => [\App\Rpc\Order\RpcOrder::class, 'getOrderInfo'], 'order.info' => [\App\Rpc\Order\RpcOrder::class, 'getOrderInfo'],
]; ];
发布的rpc方法必须在此文件注册否则无法访问
``` ```
####rpc server文件 ####rpc server文件
@ -120,7 +122,10 @@ class RpcUser extends JsonRpcMethod
} }
``` ```
####rpc client 调用
```php
$result = app('rpc.sapi')->call('user.info',[13232]);
```
####工具 ####工具
``` ```
http://host/rpc/tool.html 调用工具 http://host/rpc/tool.html 调用工具