PHP code example of tangjun / json-rpc-http

1. Go to this page and download the library: Download tangjun/json-rpc-http library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tangjun / json-rpc-http example snippets


    'providers' => [
        // ...
        TangJun\JsonRpcHttp\JsonRpcHttpServiceProvider::class,
    ]

$services = [
    [
        'services' => [
            'CalculatorService',
            'ProductService',
        ],
        'nodes' => [
            ['host' => '127.0.0.1', 'port' => 9503],
            ['host' => '127.0.0.1', 'port' => 9503]
        ]
    ]
];

return [
    'services' => $services
];

$ php artisan vendor:publish