diff --git a/README.md b/README.md index 292578e..25844a9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ JSON RPC 2.0 for Yii2 ================= Easiest way to use in 4 steps: + 1) Install via composer + in ./composer.json add into 'require' section ~~~php "cranetm/yii2-json-rpc-2.0": "dev-master" @@ -11,6 +13,7 @@ Easiest way to use in 4 steps: composer update ~~~ + 2) Use namespace in your controller ~~~php use \JsonRpc2\Controller; @@ -23,6 +26,7 @@ class ServicesController extends \JsonRpc2\Controller } ~~~ + 3) Create actions in Yii-style like ~~~php public function actionUpdate($message) @@ -31,6 +35,7 @@ public function actionUpdate($message) } ~~~ + 4) Make json request to controller (used pretty urls without index.php) ~~~php http://yoursite/services @@ -47,4 +52,4 @@ http://yoursite/services and response will be ~~~php {"jsonrpc":"2.0","id":1,"result":{"message":"hello world"}} -~~~ \ No newline at end of file +~~~