thiagof/laravelrpc

JsonRPC Client/Server services for Laravel 5
7,609 33
Install
composer require thiagof/laravelrpc
Latest Version:0.2.2
PHP:>=5.4.0
License:MIT
Last Updated:Sep 18, 2024
Links: GitHub  ·  Packagist
Maintainer: thiagof

CircleCI

Installation

With composer

composer require thiagof/laravelrpc

Laravel configuration

php artisan config:publish thiagof/laravelrpc
# Laravel > 5.1
php artisan vendor:publish --provider="Thiagof\LaravelRPC\RpcServiceProvider"

Configuration

Include the provider in app/config/app.php:

'providers' => array(
    [...]
    'Thiagof\LaravelRPC\RpcServiceProvider',
);

Also include the alias

'providers' => array(
    [...]
    'Thiagof\LaravelRPC\RpcClientFacade',
    'Thiagof\LaravelRPC\RpcServerFacade',
);

Setup your Client/Server properties in your app config/rpc.php

Usage

The Client

<?php
use RpcClient;
$result = RpcClient::myServerMethod();

The Server

<?php
Route::post('rpc', function() {
  $server = app('JsonRpcServer');
  $server->attach(new MyRpcMethods);
  $server->execute();
});

Further underlying API Reference

Please refer to fguillot/json-rpc

Related Packages

neilwong/laravelrpc

JsonRPC Client/Server services for Laravel 5

6 0
barbushin/laravel-swoole-jsonrpc

JSON-RPC server and client based on swoole, for laravel and lumen framework.

8 1
zhiyanglee/laravel-dorarpc-client

Dora RPC Client for Laravel

0 3
gitkv/laravel-gearman-rpc

Laravel/Lumen Gearman rpc. Based from https://github.com/mhlavac/gearman

66 7
vohof/transmission

Awesome PHP JSON-RPC client library for Transmission

1,714 18