PHP code example of mk-josias / laravel-distributable-rpc-http

1. Go to this page and download the library: Download mk-josias/laravel-distributable-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/ */

    

mk-josias / laravel-distributable-rpc-http example snippets


return [
    // signs every call; it falls back to APP_KEY
    'secret' => env('DISTRIBUTABLE_RPC_SECRET', env('APP_KEY', '')),
    // the same in every process
    'path' => env('DISTRIBUTABLE_RPC_PATH', '{module}/rpc/{version}/{message}'),
    // the group of those routes, which checks the signature
    'middleware_group' => 'rpc',
    // the port the RPC answers on, in a process of its own (`php artisan rpc:serve`);
    // null: wherever the application is served
    'port' => env('DISTRIBUTABLE_RPC_PORT'),
    // seconds a signature stays valid
    'signature_ttl' => 30,
];