From 1510f1034dbc161416b9afb1904aaf0ab72d3cac Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Wed, 16 Jan 2019 17:37:40 +0800 Subject: [PATCH] readme --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe73b83..fe99d1a 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ return [ 'user.relatison' => [\App\Rpc\User\RpcUser::class, 'getUserId'], 'order.info' => [\App\Rpc\Order\RpcOrder::class, 'getOrderInfo'], ]; + +发布的rpc方法必须在此文件注册,否则无法访问 ``` ####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 调用工具