定制 thiagof/laravelrpc 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thiagof/laravelrpc

最新稳定版本:0.2.2

Composer 安装命令:

composer require thiagof/laravelrpc

包简介

JsonRPC Client/Server services for Laravel 5

README 文档

README

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

统计信息

  • 总下载量: 7.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 33
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 33
  • Watchers: 4
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-26