jeudi 2 novembre 2017

Laravel - Socket.io chat system

I'm currently working on a project where two users can chat between each other. I just got socket.io working without laravel, Currently there is no chatting between users whatsoever. It is only on the homepage, and I used the tutorial that is on their website.

Question 1

I want to use socket.io for my laravel project. But I haven't found the right tutorial yet where they're making use of a database and private messaging between two logged-in users. I already have a database model, but I don't quite know if it is modelled the right way for my system. You can see the model in this picture: http://ift.tt/2yn6JhI

In my system I want to make use of a clickable message feature, With this I mean; that the user clicks on a conversation and he/she can talk with them. It is illustrated pretty well in the image below. For those who can't find it, It is the list on the left which displays the conversations.

Image: http://ift.tt/2lLl5mb Do have in mind, This picture is pure HTML, CSS. No functions whatsoever

How can I accomplish this?

Question 2

I have a small problem with the styling. I can't figure out how to style the messages separately, With this I mean, The sender's text bubble needs its background coloured while if he/she received a message, that text bubble's background colour needs to be grey. I made my message system in bootstrap. I can't figure out how to do that in the way my current system is built.

TLDR; I'm looking for a tutorial for a message system that suits my project, or tips for my project regarding socket.io, styling and implementing it all in laravel.

Thanks in advance!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2z5BnJj
via IFTTT

Aucun commentaire:

Enregistrer un commentaire