vendredi 7 septembre 2018

Not receiving message using Pusher and Echo

I have the following code in order to get messages sent by pusher:

var active_channels = new Vue({
  el: '#active_channels',
  created: function()
  {
      Echo.channel('test').listen('communication', function(e)
      {
          console.log("Got EVENT!");
          console.log(e);
      });
  },
  data: {
      channels: channels
  },
  methods:
  {
      abortSubscription:
      function(id)
      {
          console.log("Will abort ID: " + id);
      }
  }
});

However, nothing shows up in the console even if the subscription seems to be established and the message is sent. What can be the issue here?

enter image description here

Console output:

enter image description here

According to the console the connection is active:

$Pusher.instances[0].connection.state
"connected"

Thanks for any guidance!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MWiyTj
via IFTTT

Aucun commentaire:

Enregistrer un commentaire