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

132
Vistas
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 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