PHPackages                             avto-dev/json-rpc-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. avto-dev/json-rpc-laravel

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

avto-dev/json-rpc-laravel
=========================

Json Rpc package

v2.7.0(10mo ago)621.8k↓41.2%9[1 PRs](https://github.com/avto-dev/json-rpc-laravel/pulls)MITPHPPHP ^8.2CI passing

Since Dec 3Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/avto-dev/json-rpc-laravel)[ Packagist](https://packagist.org/packages/avto-dev/json-rpc-laravel)[ RSS](/packages/avto-dev-json-rpc-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (14)Used By (0)

 [![logo](https://camo.githubusercontent.com/c10634f03ff446e2a9be3d892cd83ce96717384e155ff91516fcd69a0bb91702/68747470733a2f2f6873746f2e6f72672f776562742f6c6a2f73382f65762f6c6a7338657673687a6a7675686b6d6a5f333235757179637675382e706e67)](https://camo.githubusercontent.com/c10634f03ff446e2a9be3d892cd83ce96717384e155ff91516fcd69a0bb91702/68747470733a2f2f6873746f2e6f72672f776562742f6c6a2f73382f65762f6c6a7338657673687a6a7675686b6d6a5f333235757179637675382e706e67)

JSON-RPC 2.0
============

[](#json-rpc-20)

[![Version](https://camo.githubusercontent.com/c41ab8fa017e553a626e8252ebde28be1443fc8d16682aca6a65e72678f9a5ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avto-dev/json-rpc-laravel)[![PHP Version](https://camo.githubusercontent.com/cb7500be8a0e99e4234d96d7ece681cdfb04bfab6f861d1645dcc6ec4e371b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://packagist.org/packages/avto-dev/json-rpc-laravel)[![Build Status](https://camo.githubusercontent.com/d044cc1daf7f9154d74e6c48513a9b0f03ff89d3d92ddd430fcf694179e3857f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2f74657374732e796d6c)](https://github.com/avto-dev/json-rpc-laravel/actions)[![Coverage](https://camo.githubusercontent.com/399d819f50e3684a9451d94bf5f4384f32b9766d50810b7d34e1a6c365f77e17/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2f6d61737465722e7376673f6d61784167653d3630)](https://codecov.io/gh/avto-dev/json-rpc-laravel/)[![Downloads count](https://camo.githubusercontent.com/8a0aa81a6622ed2a4f8945668c5c379b27b6fd21952138fc85f730e6935be945/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avto-dev/json-rpc-laravel)[![License](https://camo.githubusercontent.com/277fcb165022e2a20e4374de35493c41f9fd9895707d294fe5aa1c236bafeabc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6176746f2d6465762f6a736f6e2d7270632d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://github.com/avto-dev/json-rpc-laravel/blob/master/LICENSE)

[JSON-RPC 2.0](https://www.jsonrpc.org/specification) is a remote procedure call protocol encoded in JSON. It is a very simple protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered out of order.

Install
-------

[](#install)

Require this package with composer using the following command:

```
$ composer require avto-dev/json-rpc-laravel "^2.0"
```

> Installed `composer` is required ([how to install composer](https://getcomposer.org/download/)).

> You need to fix the major version of package.

Usage example
-------------

[](#usage-example)

### Create routes

[](#create-routes)

Register actions for your methods in `./routes/web.php` using the facade `RpcRouter`:

```
