Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kfiroj236's avatar

I want to create pear to pear chat application in laravel 5.6 any good tutorial for that.

I just want to create pear to pear chat like facebook in laravel 5.6 how can I do it,if someone have suggestion or any tutorial please help.

0 likes
31 replies
bashy's avatar

P2P is peer to peer and is not what Facebook's is. P2P is a technology that links clients directly to clients.

You're wanting some sort of web socket (WS) for your users to chat via. There's loads of tutorials for this. I use Pusher for a hosted socket but you can use https://socket.io/ for example.

kfiroj236's avatar

@bashy I was just developing this app in my local system so I want to use pusher to work on chat system.

can you refer me some links to this tutorial.

kfiroj236's avatar

@rin4ik thank you bro I will go through this tutorial , because I watched so many tutorials about p2p chat but all tutorial are not work for me.

bashy's avatar

@kfiroj236 You can do private channels for this. Just give it a separate ID (the two user's IDs together maybe) and authorise only those two to connect. That tutorial will get you the thing working. You can work out the rest from the docs or ask here for more info when you get there.

kfiroj236's avatar

@bashy okk will will go through that if I faced problem than will get help from here to post my code and error.

kfiroj236's avatar

@bashy I did this chat system which you told me but that chat system is like a group chat system so how can I convert to that in p2p chat system.

kfiroj236's avatar

I have done with the group chat system how can I convert it to a pear to pear private chat system and all another user should visible to me whose online or whose offline.

Cronix's avatar

pear is a fruit. You're meaning "peer to peer", or "p2p". ;)

It sounds like you haven't watched the whole video series ( https://laracasts.com/series/get-real-with-laravel-echo ) yet. It sounds like you're working with a "public channel", which anybody can view/listen/respond to. What you're wanting is to use a "private" channel covered in episode 6.

kfiroj236's avatar

@Cronix yes I want p2p chat system by using a private channel. How can I achieve this?

Cronix's avatar

watch all of the videos in that series. It's covered.

kfiroj236's avatar

I worked on chat system it's using a public channel and its a group chat how I convert it private chat.

kfiroj236's avatar

@Cronix actually for watching series I have to pay so for me it's difficult to pay for watching all the series.

Cronix's avatar

See my above reply and the one before that. The series talks about the private channels. Watch them.

jlrdw's avatar

Are you saying you want to become a developer but don't want to pay any to learn I'm glad my doctor does not have that same attitude. Surely you can afford a small amount for quality training.

kfiroj236's avatar

@rin4ik bro when I click on that link 'Скачать раздачу по magnet-ссылке · 334.7 MB' nothing will happen no download starts.

Cronix's avatar

Did you read the official pusher docs I linked to for "private channels"? Starting with the official docs is the first place you should go to get info.

jlrdw's avatar

@kfiroj236 if I was younger and needed to learn I would wash dishes , mow someone's grass or whatever it took to get me money. No response needed.

1 like
kfiroj236's avatar

@rin4ik sure bro thank you so much for your help I will surely subscribe to laracast .

kfiroj236's avatar

@jlrdw sorry for this I got what are you trying to say me. Thank you for your help.

kfiroj236's avatar

Thank you so much to everyone for the help.

Next

Please or to participate in this conversation.