title: Laravel echo server client not receiving event
body: <p>I have a small Laravel Echo Server setup using this package (<a href="https://github.com/tlaverdure/laravel-echo-server" rel="nofollow noreferrer">https://github.com/tlaverdure/laravel-echo-server</a>). I have the following setup:</p>
  
  <pre><code>// app.js
  
  import Echo from "laravel-echo";
  
  window.Echo = new Echo({
      broadcaster: 'socket.io',
      host: 'http://vaprobash.dev:6001'
  });
  
  window.Echo.channel('documents-sharing')
      .listen("Api\\DocumentShared", (event) =&gt; {
      console.log(event);
  });
  </code></pre>
  
  <p>.</p>
  
  <pre><code>// server.js
  var app = require('express')();
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  var Redis = require('ioredis');
  var redis = new Redis();
  
  http.listen(3000, function(){
      console.log('Listening on Port 3000');
  });
  
  redis.subscribe('documents-sharing', function(err, count) {
      console.log("subscribed " + count);
  });
  
  redis.on('message', function(channel, message) {
      message = JSON.parse(message);
  
      console.log('Message Received: ', channel, message);
  
      console.log(io.to(channel).emit(message.event, message.data));
  });
  </code></pre>
  
  <p>.</p>
  
  <pre><code>// laravel-echo-server.json
  {
      "authHost": "http://localhost",
      "clients": [
          {
              "appId": "986bb8954bb1e2e9",
              "key": "58ca6a205718590ad5fd88a1afc1877c"
          }
      ],
      "database": "redis",
      "databaseConfig": {
          "redis": {
              "port": "6379",
              "host": "localhost"
          },
          "sqlite": {
              "databasePath": "/database/laravel-echo-server.sqlite"
          }
      },
      "devMode": true,
      "host": "localhost",
      "port": "6001",
      "protocol": "http",
      "socketio": {},
      "sslCertPath": "",
      "sslKeyPath": ""
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>// DocumentShared.php
  class DocumentShared implements ShouldBroadcast, ShouldBroadcastNow
  {
      use SerializesModels, InteractsWithSockets;
      /**
       * @var User
       */
      public $user;
      /**
       * @var Resource
       */
      public $resource;
      /**
       * @var Share
       */
      public $share;
  
      /**
       * Create a new event instance.
       *
       * @param User $user
       * @param Resource $resource
       * @param Share $share
       */
      public function __construct(User $user, Resource $resource, Share $share)
      {
          $this-&gt;user = $user;
          $this-&gt;resource = $resource;
          $this-&gt;share = $share;
      }
  
      public function broadcastOn()
      {
          return new Channel("documents-sharing");
      }
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>// app.blade.php
  &lt;script src="{{ asset('js/socket.io.min.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/home.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>After that I run:</p>
  
  <pre><code>gulp watch
  redis-server
  node server.js
  laravel-echo-server start
  php artisan queue:listen
  </code></pre>
  
  <p>When the <code>/notify</code> route is hit, I fire the event.</p>
  
  <pre><code>Route::get('notify', function() {
      $user = User::first();
      $resource = Resource::first();
      $share = Share::first();
  
      event(new DocumentShared($user, $resource, $share));
  
      return 'done';
  });
  </code></pre>
  
  <p>I can see the server has received the event and it didn't show on the queue.</p>
  
  <p><a href="https://i.stack.imgur.com/o4jYx.png" rel="nofollow noreferrer">terminal output</a></p>