kossa
2 years ago

Laravel echo: listenForWhisper not working

Posted 2 years ago by kossa

Hello,

I want to build a simple call between 2 persons on my app, there is a button the the top left, when I click I want to show a popup for the second person without passing by Laravel, for that I'm trying to use whisper

For that I'm using:

  • Laravel 5.6
  • "vue": "^2.5.7"
  • "laravel-echo": "^1.4.0"

On my vue component I have :

created () {
        Echo.private('chat')
            .listenForWhisper('test', (e) => {
                console.log(e); // This line not show anything
            });
    },

    methods: {
        calling () {
            Echo.private('chat')
                .whisper('test', {
                    name: "John"
                });

        } 
    }

When I click on the button calling() was executed and on the dash of pusher I see the event => https://screencast.com/t/0hrsmVRUyx

But the console.log(e) not working

Where is the problem ?

Thank you

Please sign in or create an account to participate in this conversation.