Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

173
Visualizações
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 Respostas
Responde à pergunta

0

do you implement your event on ShouldBroadcast ?

use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class TestEvent implements ShouldBroadcast
{
 ....
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda