Skip to content
JSON-RPC Communication for Laravel
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Add host configuration. Mar 11, 2019
src
tests
.coveralls.yml
.gitattributes
.gitignore First. Mar 9, 2019
.php_cs
.travis.yml Tests on multiple environment. Mar 11, 2019
README.md
composer.json
phpunit.xml.dist Add basic tests. Mar 10, 2019

README.md

JSON-RPC Communication for Laravel

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Installation

Minions can be installed via composer:

composer require "katsana/minions"

The package will automatically register a service provider.

Next, you need to publish the Minions configuration file:

php artisan vendor:publish --provider="Minions\MinionsServiceProvider" --tag="config"

This is the default content of the config file that will be published as config/minions.php:

<?php

return [
    /*
     |--------------------------------------------------------------------------
     | Project ID
     |--------------------------------------------------------------------------
     |
     | Define the project ID of this application so any request by this app
     | will include the project id information allowing the server to
     | identify the source of a request.
     */

    'id' => null,

    /*
     |--------------------------------------------------------------------------
     | Server Configuration
     |--------------------------------------------------------------------------
     |
     | Define the server configuration including port number, SSL support etc.
     |
     */

    'server' => [
        'host' => env('MINION_SERVER_HOST', '127.0.0.1'),
        'port' => env('MINION_SERVER_PORT', 8085),
        'secure' => env('MINION_SERVER_SECURE', false),
        'options' => [
            'tls' => array_filter([
                'local_cert' => env('MINION_SERVER_TLS_CERT', null),
                // 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_SERVER
            ]),
        ],
    ],


    /*
     |--------------------------------------------------------------------------
     | Projects
     |--------------------------------------------------------------------------
     |
     | List of applications this app will communicate with.
     |
     */

    'projects' => [
        'platform' => [
            'endpoint' => null,
            'token' => null,
            'signature' => null,
            'options' => [],
        ],
    ],

    /*
     |--------------------------------------------------------------------------
     | Services
     |--------------------------------------------------------------------------
     |
     | List of services this app can handle as JSON-RPC server.
     |
     */

    'services' => [
        // 'add-user' => App\JsonRpc\AddUserService::class,
    ],
];

Installation for Client

To use Minions as client, you need to install the following via Composer:

composer require "clue/buzz-react=^2.5"

Installation for Server

To use Minions as client, you need to install the following via Composer:

composer require "react/http=^0.8.4"

You also need to add the following service provider to config/app.php under provides configuration:

Minions\Server\MinionsServiceProvider::class,
You can’t perform that action at this time.