Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
Broadcast or event doesnt do anything

I wanted to add some pusher stuff on my app with laravel broadcasting however using broadcast() or event() helpers doesn't do anything and I have no errors.

Added my pusher info to env, changed broadcasting driver from log to pusher and neither worked. Created test event with channel name 'my-channel' and event name 'my-event'. Some dummy data in event and tried to call broadcast/event helpers with that event.

Also started PHP artisan queue:work --tries=3

And added composer require pusher/pusher-php-server

Nothing works, not even calling event(new TestEvent()) from tinker.

Only thing that works is using Pusher class directly:

$P = NEW Pusher\Pusher('KEY','SECRET','ID', ['cluster' => 'eu']); 
$P->trigger('my-channel', 'my-event', ['message' => 'test']);
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

do you implement your event on ShouldBroadcast ?

use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class TestEvent implements ShouldBroadcast
{
 ....
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda