huangdijia/laravel-jsonrpc

jsonrpc for laravel
3,129 3
Install
composer require huangdijia/laravel-jsonrpc
Latest Version:2.0.0
PHP:>=7.3
License:MIT
Last Updated:Aug 24, 2022
Links: GitHub  ·  Packagist
Maintainer: huangdijia

laravel-jsonrpc

Latest Version on Packagist Total Downloads GitHub license

Installation

composer require huangdijia/laravel-jsonrpc

Usage

As Server

Controller
use Huangdijia\JsonRpc\Traits\JsonRpcServer;

class ExampleController extends Controller
{
    use JsonRpcServer;

    public function action()
    {
        return 'hello, json-rpc';
    }
}

Route

Route::middleware([Huangdijia\JsonRpc\Middleware\JsonRpcMiddleware::class])->group(function() {
    Route::post('/example', ExampleController::class);
});

As Client

$client = new Huangdijia\JsonRpc\Client($url);
$result = $client->action(); // hello, json-rpc

Related Packages

denpa/laravel-bitcoinrpc

Bitcoin JSON-RPC Service Provider for Laravel

55,183 90
lao-liu/laravel-hprose

Hprose client/server providers for Laravel 5.x or Lumen 5.x

1,257 20
thiagof/laravelrpc

JsonRPC Client/Server services for Laravel 5

7,620 33
greplab/laravel-jsonrpcsmd

This is a port of the greplab/jsonrpcsmd library for laravel 4.2.

23 0

Version History

Version Released PHP Laravel License
2.0.0 >=7.3 ^7.0|^8.0 MIT
1.2.1 >=7.0.0 ^5.7|^6.0|^7.0|^8.0 MIT
1.2.0 >=7.0.0 ^5.7|^6 MIT
1.1.14 >=7.0.0 ^5.7|^5.8|^6.0|^7.0 MIT
1.1.13 >=7.0.0 ^5.7|^5.8|^6.0|^7.0 MIT