2017 © Pedro Peláez
 

library thrift-laravel

use Thrift in Laravel 5.6, forked from Angejia/thrift-laravel

image

gclove/thrift-laravel

use Thrift in Laravel 5.6, forked from Angejia/thrift-laravel

  • Tuesday, May 22, 2018
  • by gclove
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 16 Versions
  • 0 % Grown

The README.md

thrift-laravel

use Thrift in Laravel, (*1)

How to use

Server side

  1. composer require Gclove/thrift-laravel
  2. add provider to app.providers: \Gclove\Thrift\ThriftServiceProvider::class
  3. setting thrift.providers in file config/thrift.php: // first is service name, defined in thrift file // second in Service implement reference, e.g. // class ImageServcie implement \Gclove\ImageServiceIf ['Gclove.ImageService', \Gclove\ImageService::class],
  4. add Middleware \Gclove\Thrift\Middleware\ThriftServerMiddleware::class to app\Http\Kernel, (*2)

    in default, the request to /rpc will be process by Middleware, if you want to change this, please extend ThriftServerMiddleware and overwrite process method, (*3)

Client side

  1. composer require Gclove/thrift-laravel
  2. add provider in app.providers: \Gclove\Thrift\ThriftServiceProvider::class
  3. setting thrift.depends in file config/thrift.php: // key is url // value is array of service name "http://localhost/rpc" => [ 'Gclove.ImageService', ]
  4. usage:, (*4)

    /** @var \Gclove\Thrift\Contracts\ThriftClient $thriftClient */
    $thriftClient = app(\Gclove\Thrift\Contracts\ThriftClient::class);
    /** @var \Gclove\ImageServiceIf $imageService */
    $imageService = $thriftClient->with('Gclove.ImageService');
    
    $result = $imageService->foo();
    

TODO

  • Unittest

The Versions

22/05 2018

dev-master

9999999-dev

use Thrift in Laravel 5.6, forked from Angejia/thrift-laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

22/05 2018

1.0.0

1.0.0.0

use Thrift in Laravel 5.6, forked from Angejia/thrift-laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

22/05 2018

0.1.2

0.1.2.0

use Thrift in Laravel 5.6, forked from Angejia/thrift-laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

22/05 2018

0.1.1

0.1.1.0

use Thrift in Laravel 5.6, forked from Gclove/thrift-laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

06/09 2016

0.2.12

0.2.12.0

use Thrift in Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

05/09 2016

0.2.11

0.2.11.0

use Thrift in Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

02/09 2016

0.2.10

0.2.10.0

use Thrift in Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

29/08 2016
29/08 2016
29/08 2016

0.1.0

0.1.0.0

thrift in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

29/08 2016

0.2.0

0.2.0.0

thrift in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

29/08 2016

0.2.1

0.2.1.0

thrift in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

29/08 2016

0.2.2

0.2.2.0

thrift in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

29/08 2016

0.2.3

0.2.3.0

thrift in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel thrift

18/08 2016