juwai / laravel-zerorpc by tjoelsson

Laravel package for zerorpc client
23,442
1
9
Package Data
Maintainer Username: tjoelsson
Maintainer Contact: engineering@juwai.com (Juwai Limited)
Package Create Date: 2016-09-26
Package Last Update: 2021-02-01
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-04 15:07:22
Package Statistics
Total Downloads: 23,442
Monthly Downloads: 11
Daily Downloads: 0
Total Stars: 1
Total Watchers: 9
Total Forks: 7
Total Open Issues: 0

laravel-zerorpc

This package provides an easy way of connecting to zerorpc from a Laravel application. It uses the PHP zerorpc client.

Installation

  1. Add facade and providers to config/app.php

    'aliases' => [
        ...
        'ZeroRPC' => Juwai\LaravelZeroRPC\Facades\ZeroRPC::class,
    ],
    
    'providers' => [
        ...
        Juwai\LaravelZeroRPC\Providers\ZeroRPCContextProvider::class,
        Juwai\LaravelZeroRPC\Providers\ZeroRPCClientProvider::class,
    ],
    
  2. Publish config file:

    $ php artisan vendor:publish
    
  3. Add real service configuration to the published config file config/zerorpc.php.

Usage

$client = ZeroRPC::get('service_one', '1.0');
$response = $client->service_function($param1, $param2);

Connection monitor

If you installed Debugbar the RPC connection information shows on Debugbar panels.