nahid / talk

Talk is a real-time users messaging and chatting system for Laravel.
MIT License
1.61k stars 327 forks source link

how can i create a conversation? #18

Closed 13dev closed 8 years ago

13dev commented 8 years ago

how can i create a conversation?

nahid commented 8 years ago

just send a message using user id.

Talk::sendMessageByUserId($userId);
13dev commented 8 years ago

ty ! what did not realize was that we passed parameter in this command? if you put 0 or nothing return all inbox if you pu the user id return empty array

nahid commented 8 years ago

You may first set authenticated users id like this

Talk::setAuthUserId(auth()->user()->id);

and then call this method with a receiver id

Talk::sendMessageByUserId($userId);
13dev commented 8 years ago

sorry in this command

Talk::getInbox()

can you explain what is parameter's ?

nahid commented 8 years ago

Please read the doc. https://github.com/nahid/talk#getinbox

this method has two optional parameters $offset and $take

13dev commented 8 years ago

and what they do, can you explain? thanks in advance

nahid commented 8 years ago

Its helps to you to make pagination.