Search code examples
laravelchatcometserversmartadmin

How to go about implementing the new Chat beta feature in the Smart Admin Theme and Laravel 5?


I am trying to figure out how to get chat working in the Smart Admin Theme

As I can see, the newer version ships with a Chat beta plugin. On the "About the API" page, it gives a few instructions on how to get the front end working but unfortunately has no information about the back end.

How do I go about implementing the back end for this chat? Do I purchase an account at CometChat. And even if I do, I am still confused about the implementation both on the back and the front end.

I mean do I listen to some events from CometChat, like from some web sockets and then check to see the new message and open a new window on the front end to display it there? Does it work like Pusher, maybe?

I terribly apologize for the vagueness of this question. It is just that I am confused about this and am not able to explain myself in well manner. Can somebody point me in the right direction on how to get the chat feature working if my back end web service is built using Laravel 5?


Solution

  • I am currently trying to use nodeJS with Socket.io. This guide will help you a long way: http://socket.io/get-started/chat/

    The reason I chose for nodeJS with Socket.io, is that it's realtime. The use of sockets allows you to send messages from server to client, instead of making your client poll for new messages every x seconds.

    With some JavaScript skills, you could easily make a nice chat application with person to person chat or even chatrooms.