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

267
Views
Vue3 laravel-echo con pusher-js no activa eventos

Estoy tratando de implementar websocket usando 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>

En las herramientas de desarrollo del navegador, puedo ver que me conecté al canal, finaliza cuando se emite el evento. También está en la red de herramientas de desarrollo. Veo los datos enviados, pero estas líneas no se activan.

 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!