Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
Vue3 laravel-echo with pusher-js not triggering events

I am trying to iplement websocket using VUE3 + LARAVEL-ECHO + PUSHER-JS

<script lang="ts">
import { defineComponent, ref, computed, onMounted, onBeforeMount } from 'vue'
import Echo from 'laravel-echo'
declare global {
    interface Window {
        Pusher:any;
        Echo:any;
    }
}
window.Pusher = require('pusher-js');
window.Echo = new Echo({
  broadcaster: 'pusher',
  key: 'mykey',
  cluster: 'mt1',
  secret: 'mysecret',
  wsHost: 'variant.uz',
  wsPort: 6001,
  forceTLS: false,
  disableStats: true,
});
export default defineComponent({
  name: 'MainLayout',
  components: {
  },
  setup () {
    onMounted(()=>{
      window.Echo.listen('EventTriggered','GetRequestEvent', (e:any)=>{
        console.log(e);
      })
    })
    return {}
  }
})
</script>

In the browser dev tools I can see that I connected to the channel, end when event emitted there is also in dev tools Network I see the data sent, but this lines are not triggering

window.Echo.listen('EventTriggered','GetRequestEvent', (e:any)=>{
        console.log(e);
      })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!