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

126
Visualizações
Websockets - Building a chatting system in Laravel

I need to build a conversations (chatting) feature on top of Laravel using Pusher.js. To do this, I would need websockets for the real time chatting.

However, I am not sure at what would be the correct approach towards solving this in a professional manner.

My current planned approach is:

I plan on having multiple Pusher channels. Each Conversation (DB Model) would have a channel_ID column which would be the Pusher channel name, only accessible by Sender / Recipient. Front-end would be a chatting app with multiple conversations shown. Once user clicks on conversation A, it would subscribe to that conversation's channel_ID (Pusher Channel). Once they click on conversation B, it would unsubscribe from channel A and subscribe to channel B.

My issues in the approach is following:

In Laravel, each Broadcast Event (mine is called message) has a function broadcastOn(). However I do not know how would I make this work for say, 10 000 conversations with all having a different channel name? I don't know if this is optimal, it does not seem too good to me.

I've already Googled for a couple of days and looked up many websocket related guides. Many of them go into detail how to create a public chat with everyone receiving the event, but none of them really go into detail how to create an user-to-user secure chatting feature.

about 4 years ago · Juan Pablo Isaza
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