PHP code example of olegkravec / laravel-redis-router

1. Go to this page and download the library: Download olegkravec/laravel-redis-router 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/ */

    

olegkravec / laravel-redis-router example snippets


$out = new OutboundStream();
    $out->request("users:*", static function($response) {
        echo "Response is: $response";
    }, "test", "Hello");

$out = new OutboundStream();
    $out->request("users:*", static function($response) {
        $user = json_decode($response);
        echo "Response is: " . $user->name;
    }, 'find', 1);